.github/workflows/ci.yaml name: Connectors CI/CD on: pull_request: branches-ignore: - rc-** workflow_dispatch: jobs: detect-targets: runs-on: ubuntu-latest outputs: modified_targets: ${{ steps.filter.outputs.modified_targets }} steps: - name: Checkout repository uses: actions/checkout@v5 with: fetch-depth: 2 - name: Detect modified targets id: filter run: | MODIFIED_TARGETS=() # Ensure HEAD^ exists if git rev-parse --verify HEAD^ >/dev/null 2>&1; then BASE_COMMIT="HEAD^" else BASE_COMMIT=$(git rev-list --max-parents=0 HEAD) # First commit fi # Check each client dynamically for client in src/*; do CLIENT_NAME=$(basename "$client") [ -d "$client" ] || continue if ! git diff --quiet "$BASE_COMMIT" HEAD -- "$client"; then echo "Changes detected in $CLIENT_NAME" MODIFIED_TARGETS+=("$CLIENT_NAME") fi done # Convert to JSON array format MODIFIED_TARGETS_JSON=$(printf '%s\n' "${MODIFIED_TARGETS[@]}" | jq -R -s -c 'split("\n") | map(select(. != ""))') echo "Detected modified targets: $MODIFIED_TARGETS_JSON" echo "modified_targets=$MODIFIED_TARGETS_JSON" >> $GITHUB_OUTPUT build-target: runs-on: ubuntu-latest needs: detect-targets if: ${{ needs.detect-targets.outputs.modified_targets != '[]' }} strategy: matrix: target: ${{ fromJson(needs.detect-targets.outputs.modified_targets) }} rust-version: [1.86.0] max-parallel: 1 steps: - name: Checkout repository uses: actions/checkout@v5 - name: Set up Rust ${{ matrix.rust-version }} uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ matrix.rust-version }} components: rustfmt, clippy rustflags: "" - name: Cache cargo registry & build uses: actions/cache@v3 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo- - name: Format Check run: | if [ -d "examples/${{ matrix.target }}" ]; then \ find examples/${{ matrix.target }} -name "*.rs" -exec rustfmt --check -- {} +; \ fi if [ -d "src/${{ matrix.target }}" ]; then \ find src/${{ matrix.target }} -name "*.rs" -exec rustfmt --check -- {} +; \ fi - name: Lint Check run: cargo clippy --all-targets $( [ "${{ matrix.target }}" = "common" ] || echo "--features ${{ matrix.target }}" ) - name: Test run: cargo test $( [ "${{ matrix.target }}" = "common" ] || echo "--features ${{ matrix.target }} ${{ matrix.target }}" ) .github/workflows/release.yaml name: Release Rust Connector on: push: branches: - main paths: - 'Cargo.toml' workflow_dispatch: jobs: release: runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v5 with: fetch-depth: 0 - name: Compare versions id: version run: | old_version=$(git show HEAD^:Cargo.toml | grep '^version' | head -1 | sed -E 's/version = "(.*)"/\1/') new_version=$(grep '^version' Cargo.toml | head -1 | sed -E 's/version = "(.*)"/\1/') if [ "$old_version" = "$new_version" ]; then echo "::error ::Version was not bumped in Cargo.toml — skipping release" exit 1 fi - name: Set up Rust uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: 1.86.0 components: rustfmt, clippy rustflags: "" - name: Cache cargo registry & build uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo- - name: Build (release) run: cargo build --all-features --release - name: Publish to crates.io env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} run: cargo publish --token $CARGO_REGISTRY_TOKEN .gitignore debug/ target/ Cargo.lock **/*.rs.bk *.pdb .vscode/settings.json { "rust-analyzer.cargo.allFeatures": true, "rust-analyzer.cargo.loadOutDirsFromCheck": true, "rust-analyzer.procMacro.enable": true } LICENCE MIT License Copyright (c) 2025 Binance Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. build.rs use rustc_version::version; fn main() { let rustc_ver = version().expect("Failed to get rustc version"); println!("cargo:rustc-env=RUSTC_VERSION=rustc {rustc_ver}"); } examples/algo/rest_api/future_algo_api/cancel_algo_order_future_algo.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::CancelAlgoOrderFutureAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = CancelAlgoOrderFutureAlgoParams::builder(1).build()?; // Make the API call let response = rest_client .cancel_algo_order_future_algo(params) .await .context("cancel_algo_order_future_algo request failed")?; info!(?response.rate_limits, "cancel_algo_order_future_algo rate limits"); let data = response.data().await?; info!(?data, "cancel_algo_order_future_algo data"); Ok(()) } examples/algo/rest_api/future_algo_api/query_current_algo_open_orders_future_algo.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::QueryCurrentAlgoOpenOrdersFutureAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentAlgoOpenOrdersFutureAlgoParams::default(); // Make the API call let response = rest_client .query_current_algo_open_orders_future_algo(params) .await .context("query_current_algo_open_orders_future_algo request failed")?; info!(?response.rate_limits, "query_current_algo_open_orders_future_algo rate limits"); let data = response.data().await?; info!(?data, "query_current_algo_open_orders_future_algo data"); Ok(()) } examples/algo/rest_api/future_algo_api/query_historical_algo_orders_future_algo.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::QueryHistoricalAlgoOrdersFutureAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = QueryHistoricalAlgoOrdersFutureAlgoParams::default(); // Make the API call let response = rest_client .query_historical_algo_orders_future_algo(params) .await .context("query_historical_algo_orders_future_algo request failed")?; info!(?response.rate_limits, "query_historical_algo_orders_future_algo rate limits"); let data = response.data().await?; info!(?data, "query_historical_algo_orders_future_algo data"); Ok(()) } examples/algo/rest_api/future_algo_api/query_sub_orders_future_algo.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::QuerySubOrdersFutureAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = QuerySubOrdersFutureAlgoParams::builder(1).build()?; // Make the API call let response = rest_client .query_sub_orders_future_algo(params) .await .context("query_sub_orders_future_algo request failed")?; info!(?response.rate_limits, "query_sub_orders_future_algo rate limits"); let data = response.data().await?; info!(?data, "query_sub_orders_future_algo data"); Ok(()) } examples/algo/rest_api/future_algo_api/time_weighted_average_price_future_algo.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::TimeWeightedAveragePriceFutureAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = TimeWeightedAveragePriceFutureAlgoParams::builder( "BTCUSDT".to_string(), "BUY".to_string(), dec!(1.0), 5000, ) .build()?; // Make the API call let response = rest_client .time_weighted_average_price_future_algo(params) .await .context("time_weighted_average_price_future_algo request failed")?; info!(?response.rate_limits, "time_weighted_average_price_future_algo rate limits"); let data = response.data().await?; info!(?data, "time_weighted_average_price_future_algo data"); Ok(()) } examples/algo/rest_api/future_algo_api/volume_participation_future_algo.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::VolumeParticipationFutureAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = VolumeParticipationFutureAlgoParams::builder( "BTCUSDT".to_string(), "BUY".to_string(), dec!(1.0), "LOW".to_string(), ) .build()?; // Make the API call let response = rest_client .volume_participation_future_algo(params) .await .context("volume_participation_future_algo request failed")?; info!(?response.rate_limits, "volume_participation_future_algo rate limits"); let data = response.data().await?; info!(?data, "volume_participation_future_algo data"); Ok(()) } examples/algo/rest_api/spot_algo_api/cancel_algo_order_spot_algo.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::CancelAlgoOrderSpotAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = CancelAlgoOrderSpotAlgoParams::builder(1).build()?; // Make the API call let response = rest_client .cancel_algo_order_spot_algo(params) .await .context("cancel_algo_order_spot_algo request failed")?; info!(?response.rate_limits, "cancel_algo_order_spot_algo rate limits"); let data = response.data().await?; info!(?data, "cancel_algo_order_spot_algo data"); Ok(()) } examples/algo/rest_api/spot_algo_api/query_current_algo_open_orders_spot_algo.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::QueryCurrentAlgoOpenOrdersSpotAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentAlgoOpenOrdersSpotAlgoParams::default(); // Make the API call let response = rest_client .query_current_algo_open_orders_spot_algo(params) .await .context("query_current_algo_open_orders_spot_algo request failed")?; info!(?response.rate_limits, "query_current_algo_open_orders_spot_algo rate limits"); let data = response.data().await?; info!(?data, "query_current_algo_open_orders_spot_algo data"); Ok(()) } examples/algo/rest_api/spot_algo_api/query_historical_algo_orders_spot_algo.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = QueryHistoricalAlgoOrdersSpotAlgoParams::default(); // Make the API call let response = rest_client .query_historical_algo_orders_spot_algo(params) .await .context("query_historical_algo_orders_spot_algo request failed")?; info!(?response.rate_limits, "query_historical_algo_orders_spot_algo rate limits"); let data = response.data().await?; info!(?data, "query_historical_algo_orders_spot_algo data"); Ok(()) } examples/algo/rest_api/spot_algo_api/query_sub_orders_spot_algo.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::QuerySubOrdersSpotAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = QuerySubOrdersSpotAlgoParams::builder(1).build()?; // Make the API call let response = rest_client .query_sub_orders_spot_algo(params) .await .context("query_sub_orders_spot_algo request failed")?; info!(?response.rate_limits, "query_sub_orders_spot_algo rate limits"); let data = response.data().await?; info!(?data, "query_sub_orders_spot_algo data"); Ok(()) } examples/algo/rest_api/spot_algo_api/time_weighted_average_price_spot_algo.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::algo::{AlgoRestApi, rest_api::TimeWeightedAveragePriceSpotAlgoParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Algo REST API client let rest_client = AlgoRestApi::production(rest_conf); // Setup the API parameters let params = TimeWeightedAveragePriceSpotAlgoParams::builder( "BTCUSDT".to_string(), "BUY".to_string(), dec!(1.0), 5000, ) .build()?; // Make the API call let response = rest_client .time_weighted_average_price_spot_algo(params) .await .context("time_weighted_average_price_spot_algo request failed")?; info!(?response.rate_limits, "time_weighted_average_price_spot_algo rate limits"); let data = response.data().await?; info!(?data, "time_weighted_average_price_spot_algo data"); Ok(()) } examples/c2c/rest_api/c2_c_api/get_c2_c_trade_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::c2c::{C2CRestApi, rest_api::GetC2CTradeHistoryParams}; use binance_sdk::config::ConfigurationRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the C2C REST API client let rest_client = C2CRestApi::production(rest_conf); // Setup the API parameters let params = GetC2CTradeHistoryParams::default(); // Make the API call let response = rest_client .get_c2_c_trade_history(params) .await .context("get_c2_c_trade_history request failed")?; info!(?response.rate_limits, "get_c2_c_trade_history rate limits"); let data = response.data().await?; info!(?data, "get_c2_c_trade_history data"); Ok(()) } examples/convert/rest_api/market_data_api/list_all_convert_pairs.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::convert::{ConvertRestApi, rest_api::ListAllConvertPairsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Convert REST API client let rest_client = ConvertRestApi::production(rest_conf); // Setup the API parameters let params = ListAllConvertPairsParams::default(); // Make the API call let response = rest_client .list_all_convert_pairs(params) .await .context("list_all_convert_pairs request failed")?; info!(?response.rate_limits, "list_all_convert_pairs rate limits"); let data = response.data().await?; info!(?data, "list_all_convert_pairs data"); Ok(()) } examples/convert/rest_api/market_data_api/query_order_quantity_precision_per_asset.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::convert::{ConvertRestApi, rest_api::QueryOrderQuantityPrecisionPerAssetParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Convert REST API client let rest_client = ConvertRestApi::production(rest_conf); // Setup the API parameters let params = QueryOrderQuantityPrecisionPerAssetParams::default(); // Make the API call let response = rest_client .query_order_quantity_precision_per_asset(params) .await .context("query_order_quantity_precision_per_asset request failed")?; info!(?response.rate_limits, "query_order_quantity_precision_per_asset rate limits"); let data = response.data().await?; info!(?data, "query_order_quantity_precision_per_asset data"); Ok(()) } examples/convert/rest_api/trade_api/accept_quote.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::convert::{ConvertRestApi, rest_api::AcceptQuoteParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Convert REST API client let rest_client = ConvertRestApi::production(rest_conf); // Setup the API parameters let params = AcceptQuoteParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .accept_quote(params) .await .context("accept_quote request failed")?; info!(?response.rate_limits, "accept_quote rate limits"); let data = response.data().await?; info!(?data, "accept_quote data"); Ok(()) } examples/convert/rest_api/trade_api/cancel_limit_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::convert::{ConvertRestApi, rest_api::CancelLimitOrderParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Convert REST API client let rest_client = ConvertRestApi::production(rest_conf); // Setup the API parameters let params = CancelLimitOrderParams::builder(1).build()?; // Make the API call let response = rest_client .cancel_limit_order(params) .await .context("cancel_limit_order request failed")?; info!(?response.rate_limits, "cancel_limit_order rate limits"); let data = response.data().await?; info!(?data, "cancel_limit_order data"); Ok(()) } examples/convert/rest_api/trade_api/get_convert_trade_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::convert::{ConvertRestApi, rest_api::GetConvertTradeHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Convert REST API client let rest_client = ConvertRestApi::production(rest_conf); // Setup the API parameters let params = GetConvertTradeHistoryParams::builder(1623319461670, 1641782889000).build()?; // Make the API call let response = rest_client .get_convert_trade_history(params) .await .context("get_convert_trade_history request failed")?; info!(?response.rate_limits, "get_convert_trade_history rate limits"); let data = response.data().await?; info!(?data, "get_convert_trade_history data"); Ok(()) } examples/convert/rest_api/trade_api/order_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::convert::{ConvertRestApi, rest_api::OrderStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Convert REST API client let rest_client = ConvertRestApi::production(rest_conf); // Setup the API parameters let params = OrderStatusParams::default(); // Make the API call let response = rest_client .order_status(params) .await .context("order_status request failed")?; info!(?response.rate_limits, "order_status rate limits"); let data = response.data().await?; info!(?data, "order_status data"); Ok(()) } examples/convert/rest_api/trade_api/place_limit_order.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::convert::{ConvertRestApi, rest_api::PlaceLimitOrderParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Convert REST API client let rest_client = ConvertRestApi::production(rest_conf); // Setup the API parameters let params = PlaceLimitOrderParams::builder( "base_asset_example".to_string(), "quote_asset_example".to_string(), dec!(1.0), "BUY".to_string(), "expired_type_example".to_string(), ) .build()?; // Make the API call let response = rest_client .place_limit_order(params) .await .context("place_limit_order request failed")?; info!(?response.rate_limits, "place_limit_order rate limits"); let data = response.data().await?; info!(?data, "place_limit_order data"); Ok(()) } examples/convert/rest_api/trade_api/query_limit_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::convert::{ConvertRestApi, rest_api::QueryLimitOpenOrdersParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Convert REST API client let rest_client = ConvertRestApi::production(rest_conf); // Setup the API parameters let params = QueryLimitOpenOrdersParams::default(); // Make the API call let response = rest_client .query_limit_open_orders(params) .await .context("query_limit_open_orders request failed")?; info!(?response.rate_limits, "query_limit_open_orders rate limits"); let data = response.data().await?; info!(?data, "query_limit_open_orders data"); Ok(()) } examples/convert/rest_api/trade_api/send_quote_request.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::convert::{ConvertRestApi, rest_api::SendQuoteRequestParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Convert REST API client let rest_client = ConvertRestApi::production(rest_conf); // Setup the API parameters let params = SendQuoteRequestParams::builder( "from_asset_example".to_string(), "to_asset_example".to_string(), ) .build()?; // Make the API call let response = rest_client .send_quote_request(params) .await .context("send_quote_request request failed")?; info!(?response.rate_limits, "send_quote_request rate limits"); let data = response.data().await?; info!(?data, "send_quote_request data"); Ok(()) } examples/copy_trading/rest_api/future_copy_trading_api/get_futures_lead_trader_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::copy_trading::{CopyTradingRestApi, rest_api::GetFuturesLeadTraderStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CopyTrading REST API client let rest_client = CopyTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetFuturesLeadTraderStatusParams::default(); // Make the API call let response = rest_client .get_futures_lead_trader_status(params) .await .context("get_futures_lead_trader_status request failed")?; info!(?response.rate_limits, "get_futures_lead_trader_status rate limits"); let data = response.data().await?; info!(?data, "get_futures_lead_trader_status data"); Ok(()) } examples/copy_trading/rest_api/future_copy_trading_api/get_futures_lead_trading_symbol_whitelist.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::copy_trading::{ CopyTradingRestApi, rest_api::GetFuturesLeadTradingSymbolWhitelistParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CopyTrading REST API client let rest_client = CopyTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetFuturesLeadTradingSymbolWhitelistParams::default(); // Make the API call let response = rest_client .get_futures_lead_trading_symbol_whitelist(params) .await .context("get_futures_lead_trading_symbol_whitelist request failed")?; info!(?response.rate_limits, "get_futures_lead_trading_symbol_whitelist rate limits"); let data = response.data().await?; info!(?data, "get_futures_lead_trading_symbol_whitelist data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/check_collateral_repay_rate.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::CheckCollateralRepayRateParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = CheckCollateralRepayRateParams::builder( "loan_coin_example".to_string(), "collateral_coin_example".to_string(), ) .build()?; // Make the API call let response = rest_client .check_collateral_repay_rate(params) .await .context("check_collateral_repay_rate request failed")?; info!(?response.rate_limits, "check_collateral_repay_rate rate limits"); let data = response.data().await?; info!(?data, "check_collateral_repay_rate data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/flexible_loan_adjust_ltv.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::FlexibleLoanAdjustLtvParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = FlexibleLoanAdjustLtvParams::builder( "loan_coin_example".to_string(), "collateral_coin_example".to_string(), dec!(1.0), "direction_example".to_string(), ) .build()?; // Make the API call let response = rest_client .flexible_loan_adjust_ltv(params) .await .context("flexible_loan_adjust_ltv request failed")?; info!(?response.rate_limits, "flexible_loan_adjust_ltv rate limits"); let data = response.data().await?; info!(?data, "flexible_loan_adjust_ltv data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/flexible_loan_borrow.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::FlexibleLoanBorrowParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = FlexibleLoanBorrowParams::builder( "loan_coin_example".to_string(), "collateral_coin_example".to_string(), ) .build()?; // Make the API call let response = rest_client .flexible_loan_borrow(params) .await .context("flexible_loan_borrow request failed")?; info!(?response.rate_limits, "flexible_loan_borrow rate limits"); let data = response.data().await?; info!(?data, "flexible_loan_borrow data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/flexible_loan_repay.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::FlexibleLoanRepayParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = FlexibleLoanRepayParams::builder( "loan_coin_example".to_string(), "collateral_coin_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .flexible_loan_repay(params) .await .context("flexible_loan_repay request failed")?; info!(?response.rate_limits, "flexible_loan_repay rate limits"); let data = response.data().await?; info!(?data, "flexible_loan_repay data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/get_flexible_loan_assets_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::GetFlexibleLoanAssetsDataParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleLoanAssetsDataParams::default(); // Make the API call let response = rest_client .get_flexible_loan_assets_data(params) .await .context("get_flexible_loan_assets_data request failed")?; info!(?response.rate_limits, "get_flexible_loan_assets_data rate limits"); let data = response.data().await?; info!(?data, "get_flexible_loan_assets_data data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/get_flexible_loan_borrow_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::GetFlexibleLoanBorrowHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleLoanBorrowHistoryParams::default(); // Make the API call let response = rest_client .get_flexible_loan_borrow_history(params) .await .context("get_flexible_loan_borrow_history request failed")?; info!(?response.rate_limits, "get_flexible_loan_borrow_history rate limits"); let data = response.data().await?; info!(?data, "get_flexible_loan_borrow_history data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/get_flexible_loan_collateral_assets_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{ CryptoLoanRestApi, rest_api::GetFlexibleLoanCollateralAssetsDataParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleLoanCollateralAssetsDataParams::default(); // Make the API call let response = rest_client .get_flexible_loan_collateral_assets_data(params) .await .context("get_flexible_loan_collateral_assets_data request failed")?; info!(?response.rate_limits, "get_flexible_loan_collateral_assets_data rate limits"); let data = response.data().await?; info!(?data, "get_flexible_loan_collateral_assets_data data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/get_flexible_loan_liquidation_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{ CryptoLoanRestApi, rest_api::GetFlexibleLoanLiquidationHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleLoanLiquidationHistoryParams::default(); // Make the API call let response = rest_client .get_flexible_loan_liquidation_history(params) .await .context("get_flexible_loan_liquidation_history request failed")?; info!(?response.rate_limits, "get_flexible_loan_liquidation_history rate limits"); let data = response.data().await?; info!(?data, "get_flexible_loan_liquidation_history data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/get_flexible_loan_ltv_adjustment_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{ CryptoLoanRestApi, rest_api::GetFlexibleLoanLtvAdjustmentHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleLoanLtvAdjustmentHistoryParams::default(); // Make the API call let response = rest_client .get_flexible_loan_ltv_adjustment_history(params) .await .context("get_flexible_loan_ltv_adjustment_history request failed")?; info!(?response.rate_limits, "get_flexible_loan_ltv_adjustment_history rate limits"); let data = response.data().await?; info!(?data, "get_flexible_loan_ltv_adjustment_history data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/get_flexible_loan_ongoing_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::GetFlexibleLoanOngoingOrdersParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleLoanOngoingOrdersParams::default(); // Make the API call let response = rest_client .get_flexible_loan_ongoing_orders(params) .await .context("get_flexible_loan_ongoing_orders request failed")?; info!(?response.rate_limits, "get_flexible_loan_ongoing_orders rate limits"); let data = response.data().await?; info!(?data, "get_flexible_loan_ongoing_orders data"); Ok(()) } examples/crypto_loan/rest_api/flexible_rate_api/get_flexible_loan_repayment_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{ CryptoLoanRestApi, rest_api::GetFlexibleLoanRepaymentHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleLoanRepaymentHistoryParams::default(); // Make the API call let response = rest_client .get_flexible_loan_repayment_history(params) .await .context("get_flexible_loan_repayment_history request failed")?; info!(?response.rate_limits, "get_flexible_loan_repayment_history rate limits"); let data = response.data().await?; info!(?data, "get_flexible_loan_repayment_history data"); Ok(()) } examples/crypto_loan/rest_api/stable_rate_api/check_collateral_repay_rate_stable_rate.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{ CryptoLoanRestApi, rest_api::CheckCollateralRepayRateStableRateParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = CheckCollateralRepayRateStableRateParams::builder( "loan_coin_example".to_string(), "collateral_coin_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .check_collateral_repay_rate_stable_rate(params) .await .context("check_collateral_repay_rate_stable_rate request failed")?; info!(?response.rate_limits, "check_collateral_repay_rate_stable_rate rate limits"); let data = response.data().await?; info!(?data, "check_collateral_repay_rate_stable_rate data"); Ok(()) } examples/crypto_loan/rest_api/stable_rate_api/get_crypto_loans_income_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::GetCryptoLoansIncomeHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetCryptoLoansIncomeHistoryParams::default(); // Make the API call let response = rest_client .get_crypto_loans_income_history(params) .await .context("get_crypto_loans_income_history request failed")?; info!(?response.rate_limits, "get_crypto_loans_income_history rate limits"); let data = response.data().await?; info!(?data, "get_crypto_loans_income_history data"); Ok(()) } examples/crypto_loan/rest_api/stable_rate_api/get_loan_borrow_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::GetLoanBorrowHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetLoanBorrowHistoryParams::default(); // Make the API call let response = rest_client .get_loan_borrow_history(params) .await .context("get_loan_borrow_history request failed")?; info!(?response.rate_limits, "get_loan_borrow_history rate limits"); let data = response.data().await?; info!(?data, "get_loan_borrow_history data"); Ok(()) } examples/crypto_loan/rest_api/stable_rate_api/get_loan_ltv_adjustment_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::GetLoanLtvAdjustmentHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetLoanLtvAdjustmentHistoryParams::default(); // Make the API call let response = rest_client .get_loan_ltv_adjustment_history(params) .await .context("get_loan_ltv_adjustment_history request failed")?; info!(?response.rate_limits, "get_loan_ltv_adjustment_history rate limits"); let data = response.data().await?; info!(?data, "get_loan_ltv_adjustment_history data"); Ok(()) } examples/crypto_loan/rest_api/stable_rate_api/get_loan_repayment_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::crypto_loan::{CryptoLoanRestApi, rest_api::GetLoanRepaymentHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the CryptoLoan REST API client let rest_client = CryptoLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetLoanRepaymentHistoryParams::default(); // Make the API call let response = rest_client .get_loan_repayment_history(params) .await .context("get_loan_repayment_history request failed")?; info!(?response.rate_limits, "get_loan_repayment_history rate limits"); let data = response.data().await?; info!(?data, "get_loan_repayment_history data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/account_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::AccountInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = AccountInformationParams::default(); // Make the API call let response = rest_client .account_information(params) .await .context("account_information request failed")?; info!(?response.rate_limits, "account_information rate limits"); let data = response.data().await?; info!(?data, "account_information data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/futures_account_balance.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::FuturesAccountBalanceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = FuturesAccountBalanceParams::default(); // Make the API call let response = rest_client .futures_account_balance(params) .await .context("futures_account_balance request failed")?; info!(?response.rate_limits, "futures_account_balance rate limits"); let data = response.data().await?; info!(?data, "futures_account_balance data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/get_current_position_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetCurrentPositionModeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetCurrentPositionModeParams::default(); // Make the API call let response = rest_client .get_current_position_mode(params) .await .context("get_current_position_mode request failed")?; info!(?response.rate_limits, "get_current_position_mode rate limits"); let data = response.data().await?; info!(?data, "get_current_position_mode data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/get_download_id_for_futures_order_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetDownloadIdForFuturesOrderHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetDownloadIdForFuturesOrderHistoryParams::builder(1623319461670, 1641782889000).build()?; // Make the API call let response = rest_client .get_download_id_for_futures_order_history(params) .await .context("get_download_id_for_futures_order_history request failed")?; info!(?response.rate_limits, "get_download_id_for_futures_order_history rate limits"); let data = response.data().await?; info!(?data, "get_download_id_for_futures_order_history data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/get_download_id_for_futures_trade_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetDownloadIdForFuturesTradeHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetDownloadIdForFuturesTradeHistoryParams::builder(1623319461670, 1641782889000).build()?; // Make the API call let response = rest_client .get_download_id_for_futures_trade_history(params) .await .context("get_download_id_for_futures_trade_history request failed")?; info!(?response.rate_limits, "get_download_id_for_futures_trade_history rate limits"); let data = response.data().await?; info!(?data, "get_download_id_for_futures_trade_history data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/get_download_id_for_futures_transaction_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetDownloadIdForFuturesTransactionHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetDownloadIdForFuturesTransactionHistoryParams::builder(1623319461670, 1641782889000) .build()?; // Make the API call let response = rest_client .get_download_id_for_futures_transaction_history(params) .await .context("get_download_id_for_futures_transaction_history request failed")?; info!(?response.rate_limits, "get_download_id_for_futures_transaction_history rate limits"); let data = response.data().await?; info!( ?data, "get_download_id_for_futures_transaction_history data" ); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/get_futures_order_history_download_link_by_id.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetFuturesOrderHistoryDownloadLinkByIdParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetFuturesOrderHistoryDownloadLinkByIdParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_futures_order_history_download_link_by_id(params) .await .context("get_futures_order_history_download_link_by_id request failed")?; info!(?response.rate_limits, "get_futures_order_history_download_link_by_id rate limits"); let data = response.data().await?; info!(?data, "get_futures_order_history_download_link_by_id data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/get_futures_trade_download_link_by_id.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetFuturesTradeDownloadLinkByIdParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetFuturesTradeDownloadLinkByIdParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_futures_trade_download_link_by_id(params) .await .context("get_futures_trade_download_link_by_id request failed")?; info!(?response.rate_limits, "get_futures_trade_download_link_by_id rate limits"); let data = response.data().await?; info!(?data, "get_futures_trade_download_link_by_id data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/get_futures_transaction_history_download_link_by_id.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetFuturesTransactionHistoryDownloadLinkByIdParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetFuturesTransactionHistoryDownloadLinkByIdParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_futures_transaction_history_download_link_by_id(params) .await .context("get_futures_transaction_history_download_link_by_id request failed")?; info!(?response.rate_limits, "get_futures_transaction_history_download_link_by_id rate limits"); let data = response.data().await?; info!( ?data, "get_futures_transaction_history_download_link_by_id data" ); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/get_income_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetIncomeHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetIncomeHistoryParams::default(); // Make the API call let response = rest_client .get_income_history(params) .await .context("get_income_history request failed")?; info!(?response.rate_limits, "get_income_history rate limits"); let data = response.data().await?; info!(?data, "get_income_history data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/notional_bracket_for_pair.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::NotionalBracketForPairParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = NotionalBracketForPairParams::default(); // Make the API call let response = rest_client .notional_bracket_for_pair(params) .await .context("notional_bracket_for_pair request failed")?; info!(?response.rate_limits, "notional_bracket_for_pair rate limits"); let data = response.data().await?; info!(?data, "notional_bracket_for_pair data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/notional_bracket_for_symbol.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::NotionalBracketForSymbolParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = NotionalBracketForSymbolParams::default(); // Make the API call let response = rest_client .notional_bracket_for_symbol(params) .await .context("notional_bracket_for_symbol request failed")?; info!(?response.rate_limits, "notional_bracket_for_symbol rate limits"); let data = response.data().await?; info!(?data, "notional_bracket_for_symbol data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/account_api/user_commission_rate.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::UserCommissionRateParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = UserCommissionRateParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .user_commission_rate(params) .await .context("user_commission_rate request failed")?; info!(?response.rate_limits, "user_commission_rate rate limits"); let data = response.data().await?; info!(?data, "user_commission_rate data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/basis.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{BasisContractTypeEnum, BasisParams, BasisPeriodEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = BasisParams::builder( "pair_example".to_string(), BasisContractTypeEnum::Perpetual, BasisPeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .basis(params) .await .context("basis request failed")?; info!(?response.rate_limits, "basis rate limits"); let data = response.data().await?; info!(?data, "basis data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/check_server_time.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .check_server_time() .await .context("check_server_time request failed")?; info!(?response.rate_limits, "check_server_time rate limits"); let data = response.data().await?; info!(?data, "check_server_time data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/compressed_aggregate_trades_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::CompressedAggregateTradesListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CompressedAggregateTradesListParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .compressed_aggregate_trades_list(params) .await .context("compressed_aggregate_trades_list request failed")?; info!(?response.rate_limits, "compressed_aggregate_trades_list rate limits"); let data = response.data().await?; info!(?data, "compressed_aggregate_trades_list data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/continuous_contract_kline_candlestick_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{ ContinuousContractKlineCandlestickDataContractTypeEnum, ContinuousContractKlineCandlestickDataIntervalEnum, ContinuousContractKlineCandlestickDataParams, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ContinuousContractKlineCandlestickDataParams::builder( "pair_example".to_string(), ContinuousContractKlineCandlestickDataContractTypeEnum::Perpetual, ContinuousContractKlineCandlestickDataIntervalEnum::Interval1m, ) .build()?; // Make the API call let response = rest_client .continuous_contract_kline_candlestick_data(params) .await .context("continuous_contract_kline_candlestick_data request failed")?; info!(?response.rate_limits, "continuous_contract_kline_candlestick_data rate limits"); let data = response.data().await?; info!(?data, "continuous_contract_kline_candlestick_data data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/exchange_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .exchange_information() .await .context("exchange_information request failed")?; info!(?response.rate_limits, "exchange_information rate limits"); let data = response.data().await?; info!(?data, "exchange_information data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/get_funding_rate_history_of_perpetual_futures.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetFundingRateHistoryOfPerpetualFuturesParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetFundingRateHistoryOfPerpetualFuturesParams::builder("symbol_example".to_string()) .build()?; // Make the API call let response = rest_client .get_funding_rate_history_of_perpetual_futures(params) .await .context("get_funding_rate_history_of_perpetual_futures request failed")?; info!(?response.rate_limits, "get_funding_rate_history_of_perpetual_futures rate limits"); let data = response.data().await?; info!(?data, "get_funding_rate_history_of_perpetual_futures data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/get_funding_rate_info.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .get_funding_rate_info() .await .context("get_funding_rate_info request failed")?; info!(?response.rate_limits, "get_funding_rate_info rate limits"); let data = response.data().await?; info!(?data, "get_funding_rate_info data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/index_price_and_mark_price.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::IndexPriceAndMarkPriceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = IndexPriceAndMarkPriceParams::default(); // Make the API call let response = rest_client .index_price_and_mark_price(params) .await .context("index_price_and_mark_price request failed")?; info!(?response.rate_limits, "index_price_and_mark_price rate limits"); let data = response.data().await?; info!(?data, "index_price_and_mark_price data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/index_price_kline_candlestick_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{IndexPriceKlineCandlestickDataIntervalEnum, IndexPriceKlineCandlestickDataParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = IndexPriceKlineCandlestickDataParams::builder( "pair_example".to_string(), IndexPriceKlineCandlestickDataIntervalEnum::Interval1m, ) .build()?; // Make the API call let response = rest_client .index_price_kline_candlestick_data(params) .await .context("index_price_kline_candlestick_data request failed")?; info!(?response.rate_limits, "index_price_kline_candlestick_data rate limits"); let data = response.data().await?; info!(?data, "index_price_kline_candlestick_data data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/kline_candlestick_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{KlineCandlestickDataIntervalEnum, KlineCandlestickDataParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = KlineCandlestickDataParams::builder( "symbol_example".to_string(), KlineCandlestickDataIntervalEnum::Interval1m, ) .build()?; // Make the API call let response = rest_client .kline_candlestick_data(params) .await .context("kline_candlestick_data request failed")?; info!(?response.rate_limits, "kline_candlestick_data rate limits"); let data = response.data().await?; info!(?data, "kline_candlestick_data data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/long_short_ratio.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{LongShortRatioParams, LongShortRatioPeriodEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = LongShortRatioParams::builder( "pair_example".to_string(), LongShortRatioPeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .long_short_ratio(params) .await .context("long_short_ratio request failed")?; info!(?response.rate_limits, "long_short_ratio rate limits"); let data = response.data().await?; info!(?data, "long_short_ratio data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/mark_price_kline_candlestick_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{MarkPriceKlineCandlestickDataIntervalEnum, MarkPriceKlineCandlestickDataParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = MarkPriceKlineCandlestickDataParams::builder( "symbol_example".to_string(), MarkPriceKlineCandlestickDataIntervalEnum::Interval1m, ) .build()?; // Make the API call let response = rest_client .mark_price_kline_candlestick_data(params) .await .context("mark_price_kline_candlestick_data request failed")?; info!(?response.rate_limits, "mark_price_kline_candlestick_data rate limits"); let data = response.data().await?; info!(?data, "mark_price_kline_candlestick_data data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/old_trades_lookup.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::OldTradesLookupParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = OldTradesLookupParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .old_trades_lookup(params) .await .context("old_trades_lookup request failed")?; info!(?response.rate_limits, "old_trades_lookup rate limits"); let data = response.data().await?; info!(?data, "old_trades_lookup data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/open_interest.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::OpenInterestParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = OpenInterestParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .open_interest(params) .await .context("open_interest request failed")?; info!(?response.rate_limits, "open_interest rate limits"); let data = response.data().await?; info!(?data, "open_interest data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/open_interest_statistics.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{ OpenInterestStatisticsContractTypeEnum, OpenInterestStatisticsParams, OpenInterestStatisticsPeriodEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = OpenInterestStatisticsParams::builder( "pair_example".to_string(), OpenInterestStatisticsContractTypeEnum::Perpetual, OpenInterestStatisticsPeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .open_interest_statistics(params) .await .context("open_interest_statistics request failed")?; info!(?response.rate_limits, "open_interest_statistics rate limits"); let data = response.data().await?; info!(?data, "open_interest_statistics data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/order_book.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::OrderBookParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = OrderBookParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .order_book(params) .await .context("order_book request failed")?; info!(?response.rate_limits, "order_book rate limits"); let data = response.data().await?; info!(?data, "order_book data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/premium_index_kline_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{PremiumIndexKlineDataIntervalEnum, PremiumIndexKlineDataParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = PremiumIndexKlineDataParams::builder( "symbol_example".to_string(), PremiumIndexKlineDataIntervalEnum::Interval1m, ) .build()?; // Make the API call let response = rest_client .premium_index_kline_data(params) .await .context("premium_index_kline_data request failed")?; info!(?response.rate_limits, "premium_index_kline_data rate limits"); let data = response.data().await?; info!(?data, "premium_index_kline_data data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/query_index_price_constituents.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::QueryIndexPriceConstituentsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QueryIndexPriceConstituentsParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_index_price_constituents(params) .await .context("query_index_price_constituents request failed")?; info!(?response.rate_limits, "query_index_price_constituents rate limits"); let data = response.data().await?; info!(?data, "query_index_price_constituents data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/recent_trades_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::RecentTradesListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = RecentTradesListParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .recent_trades_list(params) .await .context("recent_trades_list request failed")?; info!(?response.rate_limits, "recent_trades_list rate limits"); let data = response.data().await?; info!(?data, "recent_trades_list data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/symbol_order_book_ticker.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::SymbolOrderBookTickerParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = SymbolOrderBookTickerParams::default(); // Make the API call let response = rest_client .symbol_order_book_ticker(params) .await .context("symbol_order_book_ticker request failed")?; info!(?response.rate_limits, "symbol_order_book_ticker rate limits"); let data = response.data().await?; info!(?data, "symbol_order_book_ticker data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/symbol_price_ticker.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::SymbolPriceTickerParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = SymbolPriceTickerParams::default(); // Make the API call let response = rest_client .symbol_price_ticker(params) .await .context("symbol_price_ticker request failed")?; info!(?response.rate_limits, "symbol_price_ticker rate limits"); let data = response.data().await?; info!(?data, "symbol_price_ticker data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/taker_buy_sell_volume.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{ TakerBuySellVolumeContractTypeEnum, TakerBuySellVolumeParams, TakerBuySellVolumePeriodEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = TakerBuySellVolumeParams::builder( "pair_example".to_string(), TakerBuySellVolumeContractTypeEnum::Perpetual, TakerBuySellVolumePeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .taker_buy_sell_volume(params) .await .context("taker_buy_sell_volume request failed")?; info!(?response.rate_limits, "taker_buy_sell_volume rate limits"); let data = response.data().await?; info!(?data, "taker_buy_sell_volume data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/test_connectivity.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .test_connectivity() .await .context("test_connectivity request failed")?; info!(?response.rate_limits, "test_connectivity rate limits"); let data = response.data().await?; info!(?data, "test_connectivity data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/ticker24hr_price_change_statistics.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::Ticker24hrPriceChangeStatisticsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = Ticker24hrPriceChangeStatisticsParams::default(); // Make the API call let response = rest_client .ticker24hr_price_change_statistics(params) .await .context("ticker24hr_price_change_statistics request failed")?; info!(?response.rate_limits, "ticker24hr_price_change_statistics rate limits"); let data = response.data().await?; info!(?data, "ticker24hr_price_change_statistics data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/top_trader_long_short_ratio_accounts.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{TopTraderLongShortRatioAccountsParams, TopTraderLongShortRatioAccountsPeriodEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = TopTraderLongShortRatioAccountsParams::builder( "symbol_example".to_string(), TopTraderLongShortRatioAccountsPeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .top_trader_long_short_ratio_accounts(params) .await .context("top_trader_long_short_ratio_accounts request failed")?; info!(?response.rate_limits, "top_trader_long_short_ratio_accounts rate limits"); let data = response.data().await?; info!(?data, "top_trader_long_short_ratio_accounts data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/market_data_api/top_trader_long_short_ratio_positions.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{ TopTraderLongShortRatioPositionsParams, TopTraderLongShortRatioPositionsPeriodEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = TopTraderLongShortRatioPositionsParams::builder( "pair_example".to_string(), TopTraderLongShortRatioPositionsPeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .top_trader_long_short_ratio_positions(params) .await .context("top_trader_long_short_ratio_positions request failed")?; info!(?response.rate_limits, "top_trader_long_short_ratio_positions rate limits"); let data = response.data().await?; info!(?data, "top_trader_long_short_ratio_positions data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/portfolio_margin_endpoints_api/classic_portfolio_margin_account_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::ClassicPortfolioMarginAccountInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ClassicPortfolioMarginAccountInformationParams::builder("asset_example".to_string()) .build()?; // Make the API call let response = rest_client .classic_portfolio_margin_account_information(params) .await .context("classic_portfolio_margin_account_information request failed")?; info!(?response.rate_limits, "classic_portfolio_margin_account_information rate limits"); let data = response.data().await?; info!(?data, "classic_portfolio_margin_account_information data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/account_trade_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::AccountTradeListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = AccountTradeListParams::default(); // Make the API call let response = rest_client .account_trade_list(params) .await .context("account_trade_list request failed")?; info!(?response.rate_limits, "account_trade_list rate limits"); let data = response.data().await?; info!(?data, "account_trade_list data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/all_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::AllOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = AllOrdersParams::default(); // Make the API call let response = rest_client .all_orders(params) .await .context("all_orders request failed")?; info!(?response.rate_limits, "all_orders rate limits"); let data = response.data().await?; info!(?data, "all_orders data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/auto_cancel_all_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::AutoCancelAllOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = AutoCancelAllOpenOrdersParams::builder("symbol_example".to_string(), 789).build()?; // Make the API call let response = rest_client .auto_cancel_all_open_orders(params) .await .context("auto_cancel_all_open_orders request failed")?; info!(?response.rate_limits, "auto_cancel_all_open_orders rate limits"); let data = response.data().await?; info!(?data, "auto_cancel_all_open_orders data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/cancel_all_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::CancelAllOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CancelAllOpenOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_all_open_orders(params) .await .context("cancel_all_open_orders request failed")?; info!(?response.rate_limits, "cancel_all_open_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_all_open_orders data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/cancel_multiple_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::CancelMultipleOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CancelMultipleOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_multiple_orders(params) .await .context("cancel_multiple_orders request failed")?; info!(?response.rate_limits, "cancel_multiple_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_multiple_orders data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/cancel_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::CancelOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CancelOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_order(params) .await .context("cancel_order request failed")?; info!(?response.rate_limits, "cancel_order rate limits"); let data = response.data().await?; info!(?data, "cancel_order data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/change_initial_leverage.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::ChangeInitialLeverageParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ChangeInitialLeverageParams::builder("symbol_example".to_string(), 789).build()?; // Make the API call let response = rest_client .change_initial_leverage(params) .await .context("change_initial_leverage request failed")?; info!(?response.rate_limits, "change_initial_leverage rate limits"); let data = response.data().await?; info!(?data, "change_initial_leverage data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/change_margin_type.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{ChangeMarginTypeMarginTypeEnum, ChangeMarginTypeParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ChangeMarginTypeParams::builder( "symbol_example".to_string(), ChangeMarginTypeMarginTypeEnum::Isolated, ) .build()?; // Make the API call let response = rest_client .change_margin_type(params) .await .context("change_margin_type request failed")?; info!(?response.rate_limits, "change_margin_type rate limits"); let data = response.data().await?; info!(?data, "change_margin_type data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/change_position_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::ChangePositionModeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ChangePositionModeParams::builder("dual_side_position_example".to_string()).build()?; // Make the API call let response = rest_client .change_position_mode(params) .await .context("change_position_mode request failed")?; info!(?response.rate_limits, "change_position_mode rate limits"); let data = response.data().await?; info!(?data, "change_position_mode data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/current_all_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::CurrentAllOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CurrentAllOpenOrdersParams::default(); // Make the API call let response = rest_client .current_all_open_orders(params) .await .context("current_all_open_orders request failed")?; info!(?response.rate_limits, "current_all_open_orders rate limits"); let data = response.data().await?; info!(?data, "current_all_open_orders data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/get_order_modify_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetOrderModifyHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetOrderModifyHistoryParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .get_order_modify_history(params) .await .context("get_order_modify_history request failed")?; info!(?response.rate_limits, "get_order_modify_history rate limits"); let data = response.data().await?; info!(?data, "get_order_modify_history data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/get_position_margin_change_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::GetPositionMarginChangeHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetPositionMarginChangeHistoryParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .get_position_margin_change_history(params) .await .context("get_position_margin_change_history request failed")?; info!(?response.rate_limits, "get_position_margin_change_history rate limits"); let data = response.data().await?; info!(?data, "get_position_margin_change_history data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/modify_isolated_position_margin.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{ModifyIsolatedPositionMarginParams, ModifyIsolatedPositionMarginTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ModifyIsolatedPositionMarginParams::builder( "symbol_example".to_string(), dec!(1.0), ModifyIsolatedPositionMarginTypeEnum::Limit, ) .build()?; // Make the API call let response = rest_client .modify_isolated_position_margin(params) .await .context("modify_isolated_position_margin request failed")?; info!(?response.rate_limits, "modify_isolated_position_margin rate limits"); let data = response.data().await?; info!(?data, "modify_isolated_position_margin data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/modify_multiple_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::ModifyMultipleOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ModifyMultipleOrdersParams::builder(vec![]).build()?; // Make the API call let response = rest_client .modify_multiple_orders(params) .await .context("modify_multiple_orders request failed")?; info!(?response.rate_limits, "modify_multiple_orders rate limits"); let data = response.data().await?; info!(?data, "modify_multiple_orders data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/modify_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{ModifyOrderParams, ModifyOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ModifyOrderParams::builder("symbol_example".to_string(), ModifyOrderSideEnum::Buy) .build()?; // Make the API call let response = rest_client .modify_order(params) .await .context("modify_order request failed")?; info!(?response.rate_limits, "modify_order rate limits"); let data = response.data().await?; info!(?data, "modify_order data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/new_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::{NewOrderParams, NewOrderSideEnum, NewOrderTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = NewOrderParams::builder( "symbol_example".to_string(), NewOrderSideEnum::Buy, NewOrderTypeEnum::Limit, ) .build()?; // Make the API call let response = rest_client .new_order(params) .await .context("new_order request failed")?; info!(?response.rate_limits, "new_order rate limits"); let data = response.data().await?; info!(?data, "new_order data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/position_adl_quantile_estimation.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::PositionAdlQuantileEstimationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = PositionAdlQuantileEstimationParams::default(); // Make the API call let response = rest_client .position_adl_quantile_estimation(params) .await .context("position_adl_quantile_estimation request failed")?; info!(?response.rate_limits, "position_adl_quantile_estimation rate limits"); let data = response.data().await?; info!(?data, "position_adl_quantile_estimation data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/position_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::PositionInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = PositionInformationParams::default(); // Make the API call let response = rest_client .position_information(params) .await .context("position_information request failed")?; info!(?response.rate_limits, "position_information rate limits"); let data = response.data().await?; info!(?data, "position_information data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/query_current_open_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::QueryCurrentOpenOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentOpenOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_current_open_order(params) .await .context("query_current_open_order request failed")?; info!(?response.rate_limits, "query_current_open_order rate limits"); let data = response.data().await?; info!(?data, "query_current_open_order data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/query_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::QueryOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QueryOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_order(params) .await .context("query_order request failed")?; info!(?response.rate_limits, "query_order rate limits"); let data = response.data().await?; info!(?data, "query_order data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/trade_api/users_force_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesRestApi, rest_api::UsersForceOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Setup the API parameters let params = UsersForceOrdersParams::default(); // Make the API call let response = rest_client .users_force_orders(params) .await .context("users_force_orders request failed")?; info!(?response.rate_limits, "users_force_orders rate limits"); let data = response.data().await?; info!(?data, "users_force_orders data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/user_data_streams_api/close_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .close_user_data_stream() .await .context("close_user_data_stream request failed")?; info!(?response.rate_limits, "close_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "close_user_data_stream data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/user_data_streams_api/keepalive_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .keepalive_user_data_stream() .await .context("keepalive_user_data_stream request failed")?; info!(?response.rate_limits, "keepalive_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "keepalive_user_data_stream data"); Ok(()) } examples/derivatives_trading_coin_futures/rest_api/user_data_streams_api/start_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures REST API client let rest_client = DerivativesTradingCoinFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .start_user_data_stream() .await .context("start_user_data_stream request failed")?; info!(?response.rate_limits, "start_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "start_user_data_stream data"); Ok(()) } examples/derivatives_trading_coin_futures/websocket_api/account_api/account_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsApi, websocket_api::AccountInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures WebSocket API client let ws_api_client = DerivativesTradingCoinFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = AccountInformationParams::default(); // Make the WS API call let response = connection .account_information(params) .await .context("account_information request failed")?; info!(?response.rate_limits, "account_information rate limits"); let data = response.data()?; info!(?data, "account_information data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_api/account_api/futures_account_balance.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsApi, websocket_api::FuturesAccountBalanceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures WebSocket API client let ws_api_client = DerivativesTradingCoinFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = FuturesAccountBalanceParams::default(); // Make the WS API call let response = connection .futures_account_balance(params) .await .context("futures_account_balance request failed")?; info!(?response.rate_limits, "futures_account_balance rate limits"); let data = response.data()?; info!(?data, "futures_account_balance data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_api/trade_api/cancel_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsApi, websocket_api::CancelOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures WebSocket API client let ws_api_client = DerivativesTradingCoinFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = CancelOrderParams::builder("symbol_example".to_string()).build()?; // Make the WS API call let response = connection .cancel_order(params) .await .context("cancel_order request failed")?; info!(?response.rate_limits, "cancel_order rate limits"); let data = response.data()?; info!(?data, "cancel_order data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_api/trade_api/modify_order.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsApi, websocket_api::{ModifyOrderParams, ModifyOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures WebSocket API client let ws_api_client = DerivativesTradingCoinFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = ModifyOrderParams::builder( "symbol_example".to_string(), ModifyOrderSideEnum::Buy, dec!(1.0), dec!(1.0), ) .build()?; // Make the WS API call let response = connection .modify_order(params) .await .context("modify_order request failed")?; info!(?response.rate_limits, "modify_order rate limits"); let data = response.data()?; info!(?data, "modify_order data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_api/trade_api/new_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsApi, websocket_api::{NewOrderParams, NewOrderSideEnum, NewOrderTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures WebSocket API client let ws_api_client = DerivativesTradingCoinFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = NewOrderParams::builder( "symbol_example".to_string(), NewOrderSideEnum::Buy, NewOrderTypeEnum::Limit, ) .build()?; // Make the WS API call let response = connection .new_order(params) .await .context("new_order request failed")?; info!(?response.rate_limits, "new_order rate limits"); let data = response.data()?; info!(?data, "new_order data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_api/trade_api/position_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsApi, websocket_api::PositionInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures WebSocket API client let ws_api_client = DerivativesTradingCoinFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = PositionInformationParams::default(); // Make the WS API call let response = connection .position_information(params) .await .context("position_information request failed")?; info!(?response.rate_limits, "position_information rate limits"); let data = response.data()?; info!(?data, "position_information data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_api/trade_api/query_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsApi, websocket_api::QueryOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures WebSocket API client let ws_api_client = DerivativesTradingCoinFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = QueryOrderParams::builder("symbol_example".to_string()).build()?; // Make the WS API call let response = connection .query_order(params) .await .context("query_order request failed")?; info!(?response.rate_limits, "query_order rate limits"); let data = response.data()?; info!(?data, "query_order data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_api/user_data_streams_api/close_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsApi, websocket_api::CloseUserDataStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures WebSocket API client let ws_api_client = DerivativesTradingCoinFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = CloseUserDataStreamParams::default(); // Make the WS API call let response = connection .close_user_data_stream(params) .await .context("close_user_data_stream request failed")?; info!(?response.rate_limits, "close_user_data_stream rate limits"); let data = response.data()?; info!(?data, "close_user_data_stream data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_api/user_data_streams_api/keepalive_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsApi, websocket_api::KeepaliveUserDataStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures WebSocket API client let ws_api_client = DerivativesTradingCoinFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = KeepaliveUserDataStreamParams::default(); // Make the WS API call let response = connection .keepalive_user_data_stream(params) .await .context("keepalive_user_data_stream request failed")?; info!(?response.rate_limits, "keepalive_user_data_stream rate limits"); let data = response.data()?; info!(?data, "keepalive_user_data_stream data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_api/user_data_streams_api/start_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsApi, websocket_api::StartUserDataStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingCoinFutures WebSocket API client let ws_api_client = DerivativesTradingCoinFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = StartUserDataStreamParams::default(); // Make the WS API call let response = connection .start_user_data_stream(params) .await .context("start_user_data_stream request failed")?; info!(?response.rate_limits, "start_user_data_stream rate limits"); let data = response.data()?; info!(?data, "start_user_data_stream data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/aggregate_trade_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::AggregateTradeStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AggregateTradeStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .aggregate_trade_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/all_book_tickers_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::AllBookTickersStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllBookTickersStreamParams::default(); // Subscribe to the stream let stream = connection .all_book_tickers_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/all_market_liquidation_order_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::AllMarketLiquidationOrderStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllMarketLiquidationOrderStreamsParams::default(); // Subscribe to the stream let stream = connection .all_market_liquidation_order_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/all_market_mini_tickers_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::AllMarketMiniTickersStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllMarketMiniTickersStreamParams::default(); // Subscribe to the stream let stream = connection .all_market_mini_tickers_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/all_market_tickers_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::AllMarketTickersStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllMarketTickersStreamsParams::default(); // Subscribe to the stream let stream = connection .all_market_tickers_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/continuous_contract_kline_candlestick_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::ContinuousContractKlineCandlestickStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = ContinuousContractKlineCandlestickStreamsParams::builder( "btcusdt".to_string(), "next_quarter".to_string(), "1m".to_string(), ) .build()?; // Subscribe to the stream let stream = connection .continuous_contract_kline_candlestick_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/contract_info_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::ContractInfoStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = ContractInfoStreamParams::default(); // Subscribe to the stream let stream = connection .contract_info_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/diff_book_depth_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::DiffBookDepthStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = DiffBookDepthStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .diff_book_depth_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/index_kline_candlestick_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::IndexKlineCandlestickStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = IndexKlineCandlestickStreamsParams::builder("btcusdt".to_string(), "1m".to_string()) .build()?; // Subscribe to the stream let stream = connection .index_kline_candlestick_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/index_price_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::IndexPriceStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = IndexPriceStreamParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .index_price_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/individual_symbol_book_ticker_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::IndividualSymbolBookTickerStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = IndividualSymbolBookTickerStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .individual_symbol_book_ticker_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/individual_symbol_mini_ticker_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::IndividualSymbolMiniTickerStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = IndividualSymbolMiniTickerStreamParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .individual_symbol_mini_ticker_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/individual_symbol_ticker_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::IndividualSymbolTickerStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = IndividualSymbolTickerStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .individual_symbol_ticker_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/kline_candlestick_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::KlineCandlestickStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = KlineCandlestickStreamsParams::builder("btcusdt".to_string(), "1m".to_string()).build()?; // Subscribe to the stream let stream = connection .kline_candlestick_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/liquidation_order_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::LiquidationOrderStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = LiquidationOrderStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .liquidation_order_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/mark_price_kline_candlestick_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::MarkPriceKlineCandlestickStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = MarkPriceKlineCandlestickStreamsParams::builder("btcusdt".to_string(), "1m".to_string()) .build()?; // Subscribe to the stream let stream = connection .mark_price_kline_candlestick_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/mark_price_of_all_symbols_of_a_pair.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::MarkPriceOfAllSymbolsOfAPairParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = MarkPriceOfAllSymbolsOfAPairParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .mark_price_of_all_symbols_of_a_pair(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/mark_price_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::MarkPriceStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = MarkPriceStreamParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .mark_price_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_coin_futures/websocket_streams/partial_book_depth_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_coin_futures::{ DerivativesTradingCoinFuturesWsStreams, websocket_streams::PartialBookDepthStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingCoinFutures WebSocket Streams client let ws_streams_client = DerivativesTradingCoinFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = PartialBookDepthStreamsParams::builder("btcusdt".to_string(), 10).build()?; // Subscribe to the stream let stream = connection .partial_book_depth_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_options/rest_api/account_api/account_funding_flow.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::AccountFundingFlowParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = AccountFundingFlowParams::builder("currency_example".to_string()).build()?; // Make the API call let response = rest_client .account_funding_flow(params) .await .context("account_funding_flow request failed")?; info!(?response.rate_limits, "account_funding_flow rate limits"); let data = response.data().await?; info!(?data, "account_funding_flow data"); Ok(()) } examples/derivatives_trading_options/rest_api/account_api/get_download_id_for_option_transaction_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::GetDownloadIdForOptionTransactionHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = GetDownloadIdForOptionTransactionHistoryParams::builder(1623319461670, 1641782889000) .build()?; // Make the API call let response = rest_client .get_download_id_for_option_transaction_history(params) .await .context("get_download_id_for_option_transaction_history request failed")?; info!(?response.rate_limits, "get_download_id_for_option_transaction_history rate limits"); let data = response.data().await?; info!(?data, "get_download_id_for_option_transaction_history data"); Ok(()) } examples/derivatives_trading_options/rest_api/account_api/get_option_transaction_history_download_link_by_id.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::GetOptionTransactionHistoryDownloadLinkByIdParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = GetOptionTransactionHistoryDownloadLinkByIdParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_option_transaction_history_download_link_by_id(params) .await .context("get_option_transaction_history_download_link_by_id request failed")?; info!(?response.rate_limits, "get_option_transaction_history_download_link_by_id rate limits"); let data = response.data().await?; info!( ?data, "get_option_transaction_history_download_link_by_id data" ); Ok(()) } examples/derivatives_trading_options/rest_api/account_api/option_account_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::OptionAccountInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = OptionAccountInformationParams::default(); // Make the API call let response = rest_client .option_account_information(params) .await .context("option_account_information request failed")?; info!(?response.rate_limits, "option_account_information rate limits"); let data = response.data().await?; info!(?data, "option_account_information data"); Ok(()) } examples/derivatives_trading_options/rest_api/account_api/option_margin_account_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::OptionMarginAccountInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = OptionMarginAccountInformationParams::default(); // Make the API call let response = rest_client .option_margin_account_information(params) .await .context("option_margin_account_information request failed")?; info!(?response.rate_limits, "option_margin_account_information rate limits"); let data = response.data().await?; info!(?data, "option_margin_account_information data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/check_server_time.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::DerivativesTradingOptionsRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Make the API call let response = rest_client .check_server_time() .await .context("check_server_time request failed")?; info!(?response.rate_limits, "check_server_time rate limits"); let data = response.data().await?; info!(?data, "check_server_time data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/exchange_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::DerivativesTradingOptionsRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Make the API call let response = rest_client .exchange_information() .await .context("exchange_information request failed")?; info!(?response.rate_limits, "exchange_information rate limits"); let data = response.data().await?; info!(?data, "exchange_information data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/historical_exercise_records.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::HistoricalExerciseRecordsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = HistoricalExerciseRecordsParams::default(); // Make the API call let response = rest_client .historical_exercise_records(params) .await .context("historical_exercise_records request failed")?; info!(?response.rate_limits, "historical_exercise_records rate limits"); let data = response.data().await?; info!(?data, "historical_exercise_records data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/kline_candlestick_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::KlineCandlestickDataParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = KlineCandlestickDataParams::builder( "symbol_example".to_string(), "interval_example".to_string(), ) .build()?; // Make the API call let response = rest_client .kline_candlestick_data(params) .await .context("kline_candlestick_data request failed")?; info!(?response.rate_limits, "kline_candlestick_data rate limits"); let data = response.data().await?; info!(?data, "kline_candlestick_data data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/old_trades_lookup.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::OldTradesLookupParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = OldTradesLookupParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .old_trades_lookup(params) .await .context("old_trades_lookup request failed")?; info!(?response.rate_limits, "old_trades_lookup rate limits"); let data = response.data().await?; info!(?data, "old_trades_lookup data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/open_interest.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::OpenInterestParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = OpenInterestParams::builder( "underlying_asset_example".to_string(), "expiration_example".to_string(), ) .build()?; // Make the API call let response = rest_client .open_interest(params) .await .context("open_interest request failed")?; info!(?response.rate_limits, "open_interest rate limits"); let data = response.data().await?; info!(?data, "open_interest data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/option_mark_price.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::OptionMarkPriceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = OptionMarkPriceParams::default(); // Make the API call let response = rest_client .option_mark_price(params) .await .context("option_mark_price request failed")?; info!(?response.rate_limits, "option_mark_price rate limits"); let data = response.data().await?; info!(?data, "option_mark_price data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/order_book.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::OrderBookParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = OrderBookParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .order_book(params) .await .context("order_book request failed")?; info!(?response.rate_limits, "order_book rate limits"); let data = response.data().await?; info!(?data, "order_book data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/recent_block_trades_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::RecentBlockTradesListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = RecentBlockTradesListParams::default(); // Make the API call let response = rest_client .recent_block_trades_list(params) .await .context("recent_block_trades_list request failed")?; info!(?response.rate_limits, "recent_block_trades_list rate limits"); let data = response.data().await?; info!(?data, "recent_block_trades_list data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/recent_trades_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::RecentTradesListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = RecentTradesListParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .recent_trades_list(params) .await .context("recent_trades_list request failed")?; info!(?response.rate_limits, "recent_trades_list rate limits"); let data = response.data().await?; info!(?data, "recent_trades_list data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/symbol_price_ticker.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::SymbolPriceTickerParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = SymbolPriceTickerParams::builder("underlying_example".to_string()).build()?; // Make the API call let response = rest_client .symbol_price_ticker(params) .await .context("symbol_price_ticker request failed")?; info!(?response.rate_limits, "symbol_price_ticker rate limits"); let data = response.data().await?; info!(?data, "symbol_price_ticker data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/test_connectivity.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::DerivativesTradingOptionsRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Make the API call let response = rest_client .test_connectivity() .await .context("test_connectivity request failed")?; info!(?response.rate_limits, "test_connectivity rate limits"); let data = response.data().await?; info!(?data, "test_connectivity data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_data_api/ticker24hr_price_change_statistics.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::Ticker24hrPriceChangeStatisticsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = Ticker24hrPriceChangeStatisticsParams::default(); // Make the API call let response = rest_client .ticker24hr_price_change_statistics(params) .await .context("ticker24hr_price_change_statistics request failed")?; info!(?response.rate_limits, "ticker24hr_price_change_statistics rate limits"); let data = response.data().await?; info!(?data, "ticker24hr_price_change_statistics data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_block_trade_api/accept_block_trade_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::AcceptBlockTradeOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = AcceptBlockTradeOrderParams::builder("block_order_matching_key_example".to_string()) .build()?; // Make the API call let response = rest_client .accept_block_trade_order(params) .await .context("accept_block_trade_order request failed")?; info!(?response.rate_limits, "accept_block_trade_order rate limits"); let data = response.data().await?; info!(?data, "accept_block_trade_order data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_block_trade_api/account_block_trade_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::AccountBlockTradeListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = AccountBlockTradeListParams::default(); // Make the API call let response = rest_client .account_block_trade_list(params) .await .context("account_block_trade_list request failed")?; info!(?response.rate_limits, "account_block_trade_list rate limits"); let data = response.data().await?; info!(?data, "account_block_trade_list data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_block_trade_api/cancel_block_trade_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::CancelBlockTradeOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = CancelBlockTradeOrderParams::builder("block_order_matching_key_example".to_string()) .build()?; // Make the API call let response = rest_client .cancel_block_trade_order(params) .await .context("cancel_block_trade_order request failed")?; info!(?response.rate_limits, "cancel_block_trade_order rate limits"); let data = response.data().await?; info!(?data, "cancel_block_trade_order data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_block_trade_api/extend_block_trade_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::ExtendBlockTradeOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = ExtendBlockTradeOrderParams::builder("block_order_matching_key_example".to_string()) .build()?; // Make the API call let response = rest_client .extend_block_trade_order(params) .await .context("extend_block_trade_order request failed")?; info!(?response.rate_limits, "extend_block_trade_order rate limits"); let data = response.data().await?; info!(?data, "extend_block_trade_order data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_block_trade_api/new_block_trade_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::NewBlockTradeOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = NewBlockTradeOrderParams::builder("liquidity_example".to_string(), [].to_vec()).build()?; // Make the API call let response = rest_client .new_block_trade_order(params) .await .context("new_block_trade_order request failed")?; info!(?response.rate_limits, "new_block_trade_order rate limits"); let data = response.data().await?; info!(?data, "new_block_trade_order data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_block_trade_api/query_block_trade_details.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::QueryBlockTradeDetailsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = QueryBlockTradeDetailsParams::builder("block_order_matching_key_example".to_string()) .build()?; // Make the API call let response = rest_client .query_block_trade_details(params) .await .context("query_block_trade_details request failed")?; info!(?response.rate_limits, "query_block_trade_details rate limits"); let data = response.data().await?; info!(?data, "query_block_trade_details data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_block_trade_api/query_block_trade_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::QueryBlockTradeOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = QueryBlockTradeOrderParams::default(); // Make the API call let response = rest_client .query_block_trade_order(params) .await .context("query_block_trade_order request failed")?; info!(?response.rate_limits, "query_block_trade_order rate limits"); let data = response.data().await?; info!(?data, "query_block_trade_order data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_endpoints_api/auto_cancel_all_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::AutoCancelAllOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = AutoCancelAllOpenOrdersParams::builder("underlyings_example".to_string()).build()?; // Make the API call let response = rest_client .auto_cancel_all_open_orders(params) .await .context("auto_cancel_all_open_orders request failed")?; info!(?response.rate_limits, "auto_cancel_all_open_orders rate limits"); let data = response.data().await?; info!(?data, "auto_cancel_all_open_orders data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_endpoints_api/get_auto_cancel_all_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::GetAutoCancelAllOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = GetAutoCancelAllOpenOrdersParams::default(); // Make the API call let response = rest_client .get_auto_cancel_all_open_orders(params) .await .context("get_auto_cancel_all_open_orders request failed")?; info!(?response.rate_limits, "get_auto_cancel_all_open_orders rate limits"); let data = response.data().await?; info!(?data, "get_auto_cancel_all_open_orders data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_endpoints_api/get_market_maker_protection_config.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::GetMarketMakerProtectionConfigParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = GetMarketMakerProtectionConfigParams::default(); // Make the API call let response = rest_client .get_market_maker_protection_config(params) .await .context("get_market_maker_protection_config request failed")?; info!(?response.rate_limits, "get_market_maker_protection_config rate limits"); let data = response.data().await?; info!(?data, "get_market_maker_protection_config data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_endpoints_api/reset_market_maker_protection_config.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::ResetMarketMakerProtectionConfigParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = ResetMarketMakerProtectionConfigParams::default(); // Make the API call let response = rest_client .reset_market_maker_protection_config(params) .await .context("reset_market_maker_protection_config request failed")?; info!(?response.rate_limits, "reset_market_maker_protection_config rate limits"); let data = response.data().await?; info!(?data, "reset_market_maker_protection_config data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_endpoints_api/set_auto_cancel_all_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::SetAutoCancelAllOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = SetAutoCancelAllOpenOrdersParams::builder("underlying_example".to_string(), 789).build()?; // Make the API call let response = rest_client .set_auto_cancel_all_open_orders(params) .await .context("set_auto_cancel_all_open_orders request failed")?; info!(?response.rate_limits, "set_auto_cancel_all_open_orders rate limits"); let data = response.data().await?; info!(?data, "set_auto_cancel_all_open_orders data"); Ok(()) } examples/derivatives_trading_options/rest_api/market_maker_endpoints_api/set_market_maker_protection_config.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::SetMarketMakerProtectionConfigParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = SetMarketMakerProtectionConfigParams::default(); // Make the API call let response = rest_client .set_market_maker_protection_config(params) .await .context("set_market_maker_protection_config request failed")?; info!(?response.rate_limits, "set_market_maker_protection_config rate limits"); let data = response.data().await?; info!(?data, "set_market_maker_protection_config data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/account_trade_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::AccountTradeListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = AccountTradeListParams::default(); // Make the API call let response = rest_client .account_trade_list(params) .await .context("account_trade_list request failed")?; info!(?response.rate_limits, "account_trade_list rate limits"); let data = response.data().await?; info!(?data, "account_trade_list data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/cancel_all_option_orders_by_underlying.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::CancelAllOptionOrdersByUnderlyingParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = CancelAllOptionOrdersByUnderlyingParams::builder("underlying_example".to_string()) .build()?; // Make the API call let response = rest_client .cancel_all_option_orders_by_underlying(params) .await .context("cancel_all_option_orders_by_underlying request failed")?; info!(?response.rate_limits, "cancel_all_option_orders_by_underlying rate limits"); let data = response.data().await?; info!(?data, "cancel_all_option_orders_by_underlying data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/cancel_all_option_orders_on_specific_symbol.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::CancelAllOptionOrdersOnSpecificSymbolParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = CancelAllOptionOrdersOnSpecificSymbolParams::builder("symbol_example".to_string()) .build()?; // Make the API call let response = rest_client .cancel_all_option_orders_on_specific_symbol(params) .await .context("cancel_all_option_orders_on_specific_symbol request failed")?; info!(?response.rate_limits, "cancel_all_option_orders_on_specific_symbol rate limits"); let data = response.data().await?; info!(?data, "cancel_all_option_orders_on_specific_symbol data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/cancel_multiple_option_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::CancelMultipleOptionOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = CancelMultipleOptionOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_multiple_option_orders(params) .await .context("cancel_multiple_option_orders request failed")?; info!(?response.rate_limits, "cancel_multiple_option_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_multiple_option_orders data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/cancel_option_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::CancelOptionOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = CancelOptionOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_option_order(params) .await .context("cancel_option_order request failed")?; info!(?response.rate_limits, "cancel_option_order rate limits"); let data = response.data().await?; info!(?data, "cancel_option_order data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/new_order.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::{NewOrderParams, NewOrderSideEnum, NewOrderTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = NewOrderParams::builder( "symbol_example".to_string(), NewOrderSideEnum::Buy, NewOrderTypeEnum::Limit, dec!(1.0), ) .build()?; // Make the API call let response = rest_client .new_order(params) .await .context("new_order request failed")?; info!(?response.rate_limits, "new_order rate limits"); let data = response.data().await?; info!(?data, "new_order data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/option_position_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::OptionPositionInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = OptionPositionInformationParams::default(); // Make the API call let response = rest_client .option_position_information(params) .await .context("option_position_information request failed")?; info!(?response.rate_limits, "option_position_information rate limits"); let data = response.data().await?; info!(?data, "option_position_information data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/place_multiple_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::PlaceMultipleOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = PlaceMultipleOrdersParams::builder(vec![]).build()?; // Make the API call let response = rest_client .place_multiple_orders(params) .await .context("place_multiple_orders request failed")?; info!(?response.rate_limits, "place_multiple_orders rate limits"); let data = response.data().await?; info!(?data, "place_multiple_orders data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/query_current_open_option_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::QueryCurrentOpenOptionOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentOpenOptionOrdersParams::default(); // Make the API call let response = rest_client .query_current_open_option_orders(params) .await .context("query_current_open_option_orders request failed")?; info!(?response.rate_limits, "query_current_open_option_orders rate limits"); let data = response.data().await?; info!(?data, "query_current_open_option_orders data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/query_option_order_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::QueryOptionOrderHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = QueryOptionOrderHistoryParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_option_order_history(params) .await .context("query_option_order_history request failed")?; info!(?response.rate_limits, "query_option_order_history rate limits"); let data = response.data().await?; info!(?data, "query_option_order_history data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/query_single_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::QuerySingleOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = QuerySingleOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_single_order(params) .await .context("query_single_order request failed")?; info!(?response.rate_limits, "query_single_order rate limits"); let data = response.data().await?; info!(?data, "query_single_order data"); Ok(()) } examples/derivatives_trading_options/rest_api/trade_api/user_exercise_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsRestApi, rest_api::UserExerciseRecordParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Setup the API parameters let params = UserExerciseRecordParams::default(); // Make the API call let response = rest_client .user_exercise_record(params) .await .context("user_exercise_record request failed")?; info!(?response.rate_limits, "user_exercise_record rate limits"); let data = response.data().await?; info!(?data, "user_exercise_record data"); Ok(()) } examples/derivatives_trading_options/rest_api/user_data_streams_api/close_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::DerivativesTradingOptionsRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Make the API call let response = rest_client .close_user_data_stream() .await .context("close_user_data_stream request failed")?; info!(?response.rate_limits, "close_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "close_user_data_stream data"); Ok(()) } examples/derivatives_trading_options/rest_api/user_data_streams_api/keepalive_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::DerivativesTradingOptionsRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Make the API call let response = rest_client .keepalive_user_data_stream() .await .context("keepalive_user_data_stream request failed")?; info!(?response.rate_limits, "keepalive_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "keepalive_user_data_stream data"); Ok(()) } examples/derivatives_trading_options/rest_api/user_data_streams_api/start_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_options::DerivativesTradingOptionsRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingOptions REST API client let rest_client = DerivativesTradingOptionsRestApi::production(rest_conf); // Make the API call let response = rest_client .start_user_data_stream() .await .context("start_user_data_stream request failed")?; info!(?response.rate_limits, "start_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "start_user_data_stream data"); Ok(()) } examples/derivatives_trading_options/websocket_streams/index_price_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsWsStreams, websocket_streams::IndexPriceStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingOptions WebSocket Streams client let ws_streams_client = DerivativesTradingOptionsWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = IndexPriceStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .index_price_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_options/websocket_streams/kline_candlestick_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsWsStreams, websocket_streams::KlineCandlestickStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingOptions WebSocket Streams client let ws_streams_client = DerivativesTradingOptionsWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = KlineCandlestickStreamsParams::builder("btcusdt".to_string(), "1m".to_string()).build()?; // Subscribe to the stream let stream = connection .kline_candlestick_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_options/websocket_streams/mark_price.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsWsStreams, websocket_streams::MarkPriceParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingOptions WebSocket Streams client let ws_streams_client = DerivativesTradingOptionsWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = MarkPriceParams::builder("ETH".to_string()).build()?; // Subscribe to the stream let stream = connection .mark_price(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_options/websocket_streams/new_symbol_info.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsWsStreams, websocket_streams::NewSymbolInfoParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingOptions WebSocket Streams client let ws_streams_client = DerivativesTradingOptionsWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = NewSymbolInfoParams::default(); // Subscribe to the stream let stream = connection .new_symbol_info(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_options/websocket_streams/open_interest.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsWsStreams, websocket_streams::OpenInterestParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingOptions WebSocket Streams client let ws_streams_client = DerivativesTradingOptionsWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = OpenInterestParams::builder("ETH".to_string(), "220930".to_string()).build()?; // Subscribe to the stream let stream = connection .open_interest(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_options/websocket_streams/partial_book_depth_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsWsStreams, websocket_streams::PartialBookDepthStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingOptions WebSocket Streams client let ws_streams_client = DerivativesTradingOptionsWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = PartialBookDepthStreamsParams::builder("btcusdt".to_string(), 10).build()?; // Subscribe to the stream let stream = connection .partial_book_depth_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_options/websocket_streams/ticker24_hour.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsWsStreams, websocket_streams::Ticker24HourParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingOptions WebSocket Streams client let ws_streams_client = DerivativesTradingOptionsWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = Ticker24HourParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .ticker24_hour(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_options/websocket_streams/ticker24_hour_by_underlying_asset_and_expiration_data.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsWsStreams, websocket_streams::Ticker24HourByUnderlyingAssetAndExpirationDataParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingOptions WebSocket Streams client let ws_streams_client = DerivativesTradingOptionsWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = Ticker24HourByUnderlyingAssetAndExpirationDataParams::builder( "ETH".to_string(), "220930".to_string(), ) .build()?; // Subscribe to the stream let stream = connection .ticker24_hour_by_underlying_asset_and_expiration_data(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_options/websocket_streams/trade_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_options::{ DerivativesTradingOptionsWsStreams, websocket_streams::TradeStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingOptions WebSocket Streams client let ws_streams_client = DerivativesTradingOptionsWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = TradeStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .trade_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/account_balance.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::AccountBalanceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = AccountBalanceParams::default(); // Make the API call let response = rest_client .account_balance(params) .await .context("account_balance request failed")?; info!(?response.rate_limits, "account_balance rate limits"); let data = response.data().await?; info!(?data, "account_balance data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/account_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::AccountInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = AccountInformationParams::default(); // Make the API call let response = rest_client .account_information(params) .await .context("account_information request failed")?; info!(?response.rate_limits, "account_information rate limits"); let data = response.data().await?; info!(?data, "account_information data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/bnb_transfer.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::BnbTransferParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = BnbTransferParams::builder(dec!(1.0), "transfer_side_example".to_string()).build()?; // Make the API call let response = rest_client .bnb_transfer(params) .await .context("bnb_transfer request failed")?; info!(?response.rate_limits, "bnb_transfer rate limits"); let data = response.data().await?; info!(?data, "bnb_transfer data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/change_auto_repay_futures_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::ChangeAutoRepayFuturesStatusParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = ChangeAutoRepayFuturesStatusParams::builder("true".to_string()).build()?; // Make the API call let response = rest_client .change_auto_repay_futures_status(params) .await .context("change_auto_repay_futures_status request failed")?; info!(?response.rate_limits, "change_auto_repay_futures_status rate limits"); let data = response.data().await?; info!(?data, "change_auto_repay_futures_status data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/change_cm_initial_leverage.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::ChangeCmInitialLeverageParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = ChangeCmInitialLeverageParams::builder("symbol_example".to_string(), 789).build()?; // Make the API call let response = rest_client .change_cm_initial_leverage(params) .await .context("change_cm_initial_leverage request failed")?; info!(?response.rate_limits, "change_cm_initial_leverage rate limits"); let data = response.data().await?; info!(?data, "change_cm_initial_leverage data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/change_cm_position_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::ChangeCmPositionModeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = ChangeCmPositionModeParams::builder("dual_side_position_example".to_string()).build()?; // Make the API call let response = rest_client .change_cm_position_mode(params) .await .context("change_cm_position_mode request failed")?; info!(?response.rate_limits, "change_cm_position_mode rate limits"); let data = response.data().await?; info!(?data, "change_cm_position_mode data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/change_um_initial_leverage.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::ChangeUmInitialLeverageParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = ChangeUmInitialLeverageParams::builder("symbol_example".to_string(), 789).build()?; // Make the API call let response = rest_client .change_um_initial_leverage(params) .await .context("change_um_initial_leverage request failed")?; info!(?response.rate_limits, "change_um_initial_leverage rate limits"); let data = response.data().await?; info!(?data, "change_um_initial_leverage data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/change_um_position_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::ChangeUmPositionModeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = ChangeUmPositionModeParams::builder("dual_side_position_example".to_string()).build()?; // Make the API call let response = rest_client .change_um_position_mode(params) .await .context("change_um_position_mode request failed")?; info!(?response.rate_limits, "change_um_position_mode rate limits"); let data = response.data().await?; info!(?data, "change_um_position_mode data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/cm_notional_and_leverage_brackets.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CmNotionalAndLeverageBracketsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CmNotionalAndLeverageBracketsParams::default(); // Make the API call let response = rest_client .cm_notional_and_leverage_brackets(params) .await .context("cm_notional_and_leverage_brackets request failed")?; info!(?response.rate_limits, "cm_notional_and_leverage_brackets rate limits"); let data = response.data().await?; info!(?data, "cm_notional_and_leverage_brackets data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/fund_auto_collection.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::FundAutoCollectionParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = FundAutoCollectionParams::default(); // Make the API call let response = rest_client .fund_auto_collection(params) .await .context("fund_auto_collection request failed")?; info!(?response.rate_limits, "fund_auto_collection rate limits"); let data = response.data().await?; info!(?data, "fund_auto_collection data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/fund_collection_by_asset.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::FundCollectionByAssetParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = FundCollectionByAssetParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .fund_collection_by_asset(params) .await .context("fund_collection_by_asset request failed")?; info!(?response.rate_limits, "fund_collection_by_asset rate limits"); let data = response.data().await?; info!(?data, "fund_collection_by_asset data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_auto_repay_futures_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetAutoRepayFuturesStatusParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetAutoRepayFuturesStatusParams::default(); // Make the API call let response = rest_client .get_auto_repay_futures_status(params) .await .context("get_auto_repay_futures_status request failed")?; info!(?response.rate_limits, "get_auto_repay_futures_status rate limits"); let data = response.data().await?; info!(?data, "get_auto_repay_futures_status data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_cm_account_detail.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetCmAccountDetailParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetCmAccountDetailParams::default(); // Make the API call let response = rest_client .get_cm_account_detail(params) .await .context("get_cm_account_detail request failed")?; info!(?response.rate_limits, "get_cm_account_detail rate limits"); let data = response.data().await?; info!(?data, "get_cm_account_detail data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_cm_current_position_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetCmCurrentPositionModeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetCmCurrentPositionModeParams::default(); // Make the API call let response = rest_client .get_cm_current_position_mode(params) .await .context("get_cm_current_position_mode request failed")?; info!(?response.rate_limits, "get_cm_current_position_mode rate limits"); let data = response.data().await?; info!(?data, "get_cm_current_position_mode data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_cm_income_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetCmIncomeHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetCmIncomeHistoryParams::default(); // Make the API call let response = rest_client .get_cm_income_history(params) .await .context("get_cm_income_history request failed")?; info!(?response.rate_limits, "get_cm_income_history rate limits"); let data = response.data().await?; info!(?data, "get_cm_income_history data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_download_id_for_um_futures_order_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetDownloadIdForUmFuturesOrderHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetDownloadIdForUmFuturesOrderHistoryParams::builder(1623319461670, 1641782889000) .build()?; // Make the API call let response = rest_client .get_download_id_for_um_futures_order_history(params) .await .context("get_download_id_for_um_futures_order_history request failed")?; info!(?response.rate_limits, "get_download_id_for_um_futures_order_history rate limits"); let data = response.data().await?; info!(?data, "get_download_id_for_um_futures_order_history data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_download_id_for_um_futures_trade_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetDownloadIdForUmFuturesTradeHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetDownloadIdForUmFuturesTradeHistoryParams::builder(1623319461670, 1641782889000) .build()?; // Make the API call let response = rest_client .get_download_id_for_um_futures_trade_history(params) .await .context("get_download_id_for_um_futures_trade_history request failed")?; info!(?response.rate_limits, "get_download_id_for_um_futures_trade_history rate limits"); let data = response.data().await?; info!(?data, "get_download_id_for_um_futures_trade_history data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_download_id_for_um_futures_transaction_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetDownloadIdForUmFuturesTransactionHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetDownloadIdForUmFuturesTransactionHistoryParams::builder(1623319461670, 1641782889000) .build()?; // Make the API call let response = rest_client .get_download_id_for_um_futures_transaction_history(params) .await .context("get_download_id_for_um_futures_transaction_history request failed")?; info!(?response.rate_limits, "get_download_id_for_um_futures_transaction_history rate limits"); let data = response.data().await?; info!( ?data, "get_download_id_for_um_futures_transaction_history data" ); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_margin_borrow_loan_interest_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetMarginBorrowLoanInterestHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetMarginBorrowLoanInterestHistoryParams::default(); // Make the API call let response = rest_client .get_margin_borrow_loan_interest_history(params) .await .context("get_margin_borrow_loan_interest_history request failed")?; info!(?response.rate_limits, "get_margin_borrow_loan_interest_history rate limits"); let data = response.data().await?; info!(?data, "get_margin_borrow_loan_interest_history data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_um_account_detail.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetUmAccountDetailParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetUmAccountDetailParams::default(); // Make the API call let response = rest_client .get_um_account_detail(params) .await .context("get_um_account_detail request failed")?; info!(?response.rate_limits, "get_um_account_detail rate limits"); let data = response.data().await?; info!(?data, "get_um_account_detail data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_um_account_detail_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetUmAccountDetailV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetUmAccountDetailV2Params::default(); // Make the API call let response = rest_client .get_um_account_detail_v2(params) .await .context("get_um_account_detail_v2 request failed")?; info!(?response.rate_limits, "get_um_account_detail_v2 rate limits"); let data = response.data().await?; info!(?data, "get_um_account_detail_v2 data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_um_current_position_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetUmCurrentPositionModeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetUmCurrentPositionModeParams::default(); // Make the API call let response = rest_client .get_um_current_position_mode(params) .await .context("get_um_current_position_mode request failed")?; info!(?response.rate_limits, "get_um_current_position_mode rate limits"); let data = response.data().await?; info!(?data, "get_um_current_position_mode data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_um_futures_order_download_link_by_id.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetUmFuturesOrderDownloadLinkByIdParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetUmFuturesOrderDownloadLinkByIdParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_um_futures_order_download_link_by_id(params) .await .context("get_um_futures_order_download_link_by_id request failed")?; info!(?response.rate_limits, "get_um_futures_order_download_link_by_id rate limits"); let data = response.data().await?; info!(?data, "get_um_futures_order_download_link_by_id data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_um_futures_trade_download_link_by_id.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetUmFuturesTradeDownloadLinkByIdParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetUmFuturesTradeDownloadLinkByIdParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_um_futures_trade_download_link_by_id(params) .await .context("get_um_futures_trade_download_link_by_id request failed")?; info!(?response.rate_limits, "get_um_futures_trade_download_link_by_id rate limits"); let data = response.data().await?; info!(?data, "get_um_futures_trade_download_link_by_id data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_um_futures_transaction_download_link_by_id.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetUmFuturesTransactionDownloadLinkByIdParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetUmFuturesTransactionDownloadLinkByIdParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_um_futures_transaction_download_link_by_id(params) .await .context("get_um_futures_transaction_download_link_by_id request failed")?; info!(?response.rate_limits, "get_um_futures_transaction_download_link_by_id rate limits"); let data = response.data().await?; info!(?data, "get_um_futures_transaction_download_link_by_id data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_um_income_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetUmIncomeHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetUmIncomeHistoryParams::default(); // Make the API call let response = rest_client .get_um_income_history(params) .await .context("get_um_income_history request failed")?; info!(?response.rate_limits, "get_um_income_history rate limits"); let data = response.data().await?; info!(?data, "get_um_income_history data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_user_commission_rate_for_cm.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetUserCommissionRateForCmParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetUserCommissionRateForCmParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .get_user_commission_rate_for_cm(params) .await .context("get_user_commission_rate_for_cm request failed")?; info!(?response.rate_limits, "get_user_commission_rate_for_cm rate limits"); let data = response.data().await?; info!(?data, "get_user_commission_rate_for_cm data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/get_user_commission_rate_for_um.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetUserCommissionRateForUmParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetUserCommissionRateForUmParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .get_user_commission_rate_for_um(params) .await .context("get_user_commission_rate_for_um request failed")?; info!(?response.rate_limits, "get_user_commission_rate_for_um rate limits"); let data = response.data().await?; info!(?data, "get_user_commission_rate_for_um data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/margin_max_borrow.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::MarginMaxBorrowParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = MarginMaxBorrowParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .margin_max_borrow(params) .await .context("margin_max_borrow request failed")?; info!(?response.rate_limits, "margin_max_borrow rate limits"); let data = response.data().await?; info!(?data, "margin_max_borrow data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/portfolio_margin_um_trading_quantitative_rules_indicators.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::PortfolioMarginUmTradingQuantitativeRulesIndicatorsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = PortfolioMarginUmTradingQuantitativeRulesIndicatorsParams::default(); // Make the API call let response = rest_client .portfolio_margin_um_trading_quantitative_rules_indicators(params) .await .context("portfolio_margin_um_trading_quantitative_rules_indicators request failed")?; info!(?response.rate_limits, "portfolio_margin_um_trading_quantitative_rules_indicators rate limits"); let data = response.data().await?; info!( ?data, "portfolio_margin_um_trading_quantitative_rules_indicators data" ); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/query_cm_position_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryCmPositionInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryCmPositionInformationParams::default(); // Make the API call let response = rest_client .query_cm_position_information(params) .await .context("query_cm_position_information request failed")?; info!(?response.rate_limits, "query_cm_position_information rate limits"); let data = response.data().await?; info!(?data, "query_cm_position_information data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/query_margin_loan_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryMarginLoanRecordParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginLoanRecordParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .query_margin_loan_record(params) .await .context("query_margin_loan_record request failed")?; info!(?response.rate_limits, "query_margin_loan_record rate limits"); let data = response.data().await?; info!(?data, "query_margin_loan_record data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/query_margin_max_withdraw.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryMarginMaxWithdrawParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginMaxWithdrawParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .query_margin_max_withdraw(params) .await .context("query_margin_max_withdraw request failed")?; info!(?response.rate_limits, "query_margin_max_withdraw rate limits"); let data = response.data().await?; info!(?data, "query_margin_max_withdraw data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/query_margin_repay_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryMarginRepayRecordParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginRepayRecordParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .query_margin_repay_record(params) .await .context("query_margin_repay_record request failed")?; info!(?response.rate_limits, "query_margin_repay_record rate limits"); let data = response.data().await?; info!(?data, "query_margin_repay_record data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/query_portfolio_margin_negative_balance_interest_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryPortfolioMarginNegativeBalanceInterestHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryPortfolioMarginNegativeBalanceInterestHistoryParams::default(); // Make the API call let response = rest_client .query_portfolio_margin_negative_balance_interest_history(params) .await .context("query_portfolio_margin_negative_balance_interest_history request failed")?; info!(?response.rate_limits, "query_portfolio_margin_negative_balance_interest_history rate limits"); let data = response.data().await?; info!( ?data, "query_portfolio_margin_negative_balance_interest_history data" ); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/query_um_position_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryUmPositionInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryUmPositionInformationParams::default(); // Make the API call let response = rest_client .query_um_position_information(params) .await .context("query_um_position_information request failed")?; info!(?response.rate_limits, "query_um_position_information rate limits"); let data = response.data().await?; info!(?data, "query_um_position_information data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/query_user_negative_balance_auto_exchange_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryUserNegativeBalanceAutoExchangeRecordParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryUserNegativeBalanceAutoExchangeRecordParams::builder(1623319461670, 1641782889000) .build()?; // Make the API call let response = rest_client .query_user_negative_balance_auto_exchange_record(params) .await .context("query_user_negative_balance_auto_exchange_record request failed")?; info!(?response.rate_limits, "query_user_negative_balance_auto_exchange_record rate limits"); let data = response.data().await?; info!( ?data, "query_user_negative_balance_auto_exchange_record data" ); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/query_user_rate_limit.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryUserRateLimitParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryUserRateLimitParams::default(); // Make the API call let response = rest_client .query_user_rate_limit(params) .await .context("query_user_rate_limit request failed")?; info!(?response.rate_limits, "query_user_rate_limit rate limits"); let data = response.data().await?; info!(?data, "query_user_rate_limit data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/repay_futures_negative_balance.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::RepayFuturesNegativeBalanceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = RepayFuturesNegativeBalanceParams::default(); // Make the API call let response = rest_client .repay_futures_negative_balance(params) .await .context("repay_futures_negative_balance request failed")?; info!(?response.rate_limits, "repay_futures_negative_balance rate limits"); let data = response.data().await?; info!(?data, "repay_futures_negative_balance data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/um_futures_account_configuration.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::UmFuturesAccountConfigurationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = UmFuturesAccountConfigurationParams::default(); // Make the API call let response = rest_client .um_futures_account_configuration(params) .await .context("um_futures_account_configuration request failed")?; info!(?response.rate_limits, "um_futures_account_configuration rate limits"); let data = response.data().await?; info!(?data, "um_futures_account_configuration data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/um_futures_symbol_configuration.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::UmFuturesSymbolConfigurationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = UmFuturesSymbolConfigurationParams::default(); // Make the API call let response = rest_client .um_futures_symbol_configuration(params) .await .context("um_futures_symbol_configuration request failed")?; info!(?response.rate_limits, "um_futures_symbol_configuration rate limits"); let data = response.data().await?; info!(?data, "um_futures_symbol_configuration data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/account_api/um_notional_and_leverage_brackets.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::UmNotionalAndLeverageBracketsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = UmNotionalAndLeverageBracketsParams::default(); // Make the API call let response = rest_client .um_notional_and_leverage_brackets(params) .await .context("um_notional_and_leverage_brackets request failed")?; info!(?response.rate_limits, "um_notional_and_leverage_brackets rate limits"); let data = response.data().await?; info!(?data, "um_notional_and_leverage_brackets data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/market_data_api/test_connectivity.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Make the API call let response = rest_client .test_connectivity() .await .context("test_connectivity request failed")?; info!(?response.rate_limits, "test_connectivity rate limits"); let data = response.data().await?; info!(?data, "test_connectivity data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_all_cm_open_conditional_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelAllCmOpenConditionalOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelAllCmOpenConditionalOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_all_cm_open_conditional_orders(params) .await .context("cancel_all_cm_open_conditional_orders request failed")?; info!(?response.rate_limits, "cancel_all_cm_open_conditional_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_all_cm_open_conditional_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_all_cm_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelAllCmOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelAllCmOpenOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_all_cm_open_orders(params) .await .context("cancel_all_cm_open_orders request failed")?; info!(?response.rate_limits, "cancel_all_cm_open_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_all_cm_open_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_all_um_open_conditional_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelAllUmOpenConditionalOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelAllUmOpenConditionalOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_all_um_open_conditional_orders(params) .await .context("cancel_all_um_open_conditional_orders request failed")?; info!(?response.rate_limits, "cancel_all_um_open_conditional_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_all_um_open_conditional_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_all_um_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelAllUmOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelAllUmOpenOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_all_um_open_orders(params) .await .context("cancel_all_um_open_orders request failed")?; info!(?response.rate_limits, "cancel_all_um_open_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_all_um_open_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_cm_conditional_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelCmConditionalOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelCmConditionalOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_cm_conditional_order(params) .await .context("cancel_cm_conditional_order request failed")?; info!(?response.rate_limits, "cancel_cm_conditional_order rate limits"); let data = response.data().await?; info!(?data, "cancel_cm_conditional_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_cm_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelCmOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelCmOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_cm_order(params) .await .context("cancel_cm_order request failed")?; info!(?response.rate_limits, "cancel_cm_order rate limits"); let data = response.data().await?; info!(?data, "cancel_cm_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_margin_account_all_open_orders_on_a_symbol.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelMarginAccountAllOpenOrdersOnASymbolParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelMarginAccountAllOpenOrdersOnASymbolParams::builder("symbol_example".to_string()) .build()?; // Make the API call let response = rest_client .cancel_margin_account_all_open_orders_on_a_symbol(params) .await .context("cancel_margin_account_all_open_orders_on_a_symbol request failed")?; info!(?response.rate_limits, "cancel_margin_account_all_open_orders_on_a_symbol rate limits"); let data = response.data().await?; info!( ?data, "cancel_margin_account_all_open_orders_on_a_symbol data" ); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_margin_account_oco_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelMarginAccountOcoOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelMarginAccountOcoOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_margin_account_oco_orders(params) .await .context("cancel_margin_account_oco_orders request failed")?; info!(?response.rate_limits, "cancel_margin_account_oco_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_margin_account_oco_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_margin_account_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelMarginAccountOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelMarginAccountOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_margin_account_order(params) .await .context("cancel_margin_account_order request failed")?; info!(?response.rate_limits, "cancel_margin_account_order rate limits"); let data = response.data().await?; info!(?data, "cancel_margin_account_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_um_conditional_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelUmConditionalOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelUmConditionalOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_um_conditional_order(params) .await .context("cancel_um_conditional_order request failed")?; info!(?response.rate_limits, "cancel_um_conditional_order rate limits"); let data = response.data().await?; info!(?data, "cancel_um_conditional_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cancel_um_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CancelUmOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CancelUmOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_um_order(params) .await .context("cancel_um_order request failed")?; info!(?response.rate_limits, "cancel_um_order rate limits"); let data = response.data().await?; info!(?data, "cancel_um_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cm_account_trade_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CmAccountTradeListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CmAccountTradeListParams::default(); // Make the API call let response = rest_client .cm_account_trade_list(params) .await .context("cm_account_trade_list request failed")?; info!(?response.rate_limits, "cm_account_trade_list rate limits"); let data = response.data().await?; info!(?data, "cm_account_trade_list data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/cm_position_adl_quantile_estimation.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::CmPositionAdlQuantileEstimationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = CmPositionAdlQuantileEstimationParams::default(); // Make the API call let response = rest_client .cm_position_adl_quantile_estimation(params) .await .context("cm_position_adl_quantile_estimation request failed")?; info!(?response.rate_limits, "cm_position_adl_quantile_estimation rate limits"); let data = response.data().await?; info!(?data, "cm_position_adl_quantile_estimation data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/get_um_futures_bnb_burn_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::GetUmFuturesBnbBurnStatusParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = GetUmFuturesBnbBurnStatusParams::default(); // Make the API call let response = rest_client .get_um_futures_bnb_burn_status(params) .await .context("get_um_futures_bnb_burn_status request failed")?; info!(?response.rate_limits, "get_um_futures_bnb_burn_status rate limits"); let data = response.data().await?; info!(?data, "get_um_futures_bnb_burn_status data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/margin_account_borrow.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::MarginAccountBorrowParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountBorrowParams::builder("asset_example".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .margin_account_borrow(params) .await .context("margin_account_borrow request failed")?; info!(?response.rate_limits, "margin_account_borrow rate limits"); let data = response.data().await?; info!(?data, "margin_account_borrow data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/margin_account_new_oco.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::{MarginAccountNewOcoParams, MarginAccountNewOcoSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountNewOcoParams::builder( "symbol_example".to_string(), MarginAccountNewOcoSideEnum::Buy, dec!(1.0), dec!(1.0), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .margin_account_new_oco(params) .await .context("margin_account_new_oco request failed")?; info!(?response.rate_limits, "margin_account_new_oco rate limits"); let data = response.data().await?; info!(?data, "margin_account_new_oco data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/margin_account_repay.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::MarginAccountRepayParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountRepayParams::builder("asset_example".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .margin_account_repay(params) .await .context("margin_account_repay request failed")?; info!(?response.rate_limits, "margin_account_repay rate limits"); let data = response.data().await?; info!(?data, "margin_account_repay data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/margin_account_repay_debt.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::MarginAccountRepayDebtParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountRepayDebtParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .margin_account_repay_debt(params) .await .context("margin_account_repay_debt request failed")?; info!(?response.rate_limits, "margin_account_repay_debt rate limits"); let data = response.data().await?; info!(?data, "margin_account_repay_debt data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/margin_account_trade_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::MarginAccountTradeListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountTradeListParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .margin_account_trade_list(params) .await .context("margin_account_trade_list request failed")?; info!(?response.rate_limits, "margin_account_trade_list rate limits"); let data = response.data().await?; info!(?data, "margin_account_trade_list data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/modify_cm_order.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::{ModifyCmOrderParams, ModifyCmOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = ModifyCmOrderParams::builder( "symbol_example".to_string(), ModifyCmOrderSideEnum::Buy, dec!(1.0), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .modify_cm_order(params) .await .context("modify_cm_order request failed")?; info!(?response.rate_limits, "modify_cm_order rate limits"); let data = response.data().await?; info!(?data, "modify_cm_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/modify_um_order.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::{ModifyUmOrderParams, ModifyUmOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = ModifyUmOrderParams::builder( "symbol_example".to_string(), ModifyUmOrderSideEnum::Buy, dec!(1.0), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .modify_um_order(params) .await .context("modify_um_order request failed")?; info!(?response.rate_limits, "modify_um_order rate limits"); let data = response.data().await?; info!(?data, "modify_um_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/new_cm_conditional_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::{ NewCmConditionalOrderParams, NewCmConditionalOrderSideEnum, NewCmConditionalOrderStrategyTypeEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = NewCmConditionalOrderParams::builder( "symbol_example".to_string(), NewCmConditionalOrderSideEnum::Buy, NewCmConditionalOrderStrategyTypeEnum::Stop, ) .build()?; // Make the API call let response = rest_client .new_cm_conditional_order(params) .await .context("new_cm_conditional_order request failed")?; info!(?response.rate_limits, "new_cm_conditional_order rate limits"); let data = response.data().await?; info!(?data, "new_cm_conditional_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/new_cm_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::{NewCmOrderParams, NewCmOrderSideEnum, NewCmOrderTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = NewCmOrderParams::builder( "symbol_example".to_string(), NewCmOrderSideEnum::Buy, NewCmOrderTypeEnum::Limit, ) .build()?; // Make the API call let response = rest_client .new_cm_order(params) .await .context("new_cm_order request failed")?; info!(?response.rate_limits, "new_cm_order rate limits"); let data = response.data().await?; info!(?data, "new_cm_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/new_margin_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::{NewMarginOrderParams, NewMarginOrderSideEnum, NewMarginOrderTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = NewMarginOrderParams::builder( "symbol_example".to_string(), NewMarginOrderSideEnum::Buy, NewMarginOrderTypeEnum::Limit, ) .build()?; // Make the API call let response = rest_client .new_margin_order(params) .await .context("new_margin_order request failed")?; info!(?response.rate_limits, "new_margin_order rate limits"); let data = response.data().await?; info!(?data, "new_margin_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/new_um_conditional_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::{ NewUmConditionalOrderParams, NewUmConditionalOrderSideEnum, NewUmConditionalOrderStrategyTypeEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = NewUmConditionalOrderParams::builder( "symbol_example".to_string(), NewUmConditionalOrderSideEnum::Buy, NewUmConditionalOrderStrategyTypeEnum::Stop, ) .build()?; // Make the API call let response = rest_client .new_um_conditional_order(params) .await .context("new_um_conditional_order request failed")?; info!(?response.rate_limits, "new_um_conditional_order rate limits"); let data = response.data().await?; info!(?data, "new_um_conditional_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/new_um_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::{NewUmOrderParams, NewUmOrderSideEnum, NewUmOrderTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = NewUmOrderParams::builder( "symbol_example".to_string(), NewUmOrderSideEnum::Buy, NewUmOrderTypeEnum::Limit, ) .build()?; // Make the API call let response = rest_client .new_um_order(params) .await .context("new_um_order request failed")?; info!(?response.rate_limits, "new_um_order rate limits"); let data = response.data().await?; info!(?data, "new_um_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_all_cm_conditional_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryAllCmConditionalOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryAllCmConditionalOrdersParams::default(); // Make the API call let response = rest_client .query_all_cm_conditional_orders(params) .await .context("query_all_cm_conditional_orders request failed")?; info!(?response.rate_limits, "query_all_cm_conditional_orders rate limits"); let data = response.data().await?; info!(?data, "query_all_cm_conditional_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_all_cm_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryAllCmOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryAllCmOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_all_cm_orders(params) .await .context("query_all_cm_orders request failed")?; info!(?response.rate_limits, "query_all_cm_orders rate limits"); let data = response.data().await?; info!(?data, "query_all_cm_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_all_current_cm_open_conditional_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryAllCurrentCmOpenConditionalOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryAllCurrentCmOpenConditionalOrdersParams::default(); // Make the API call let response = rest_client .query_all_current_cm_open_conditional_orders(params) .await .context("query_all_current_cm_open_conditional_orders request failed")?; info!(?response.rate_limits, "query_all_current_cm_open_conditional_orders rate limits"); let data = response.data().await?; info!(?data, "query_all_current_cm_open_conditional_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_all_current_cm_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryAllCurrentCmOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryAllCurrentCmOpenOrdersParams::default(); // Make the API call let response = rest_client .query_all_current_cm_open_orders(params) .await .context("query_all_current_cm_open_orders request failed")?; info!(?response.rate_limits, "query_all_current_cm_open_orders rate limits"); let data = response.data().await?; info!(?data, "query_all_current_cm_open_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_all_current_um_open_conditional_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryAllCurrentUmOpenConditionalOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryAllCurrentUmOpenConditionalOrdersParams::default(); // Make the API call let response = rest_client .query_all_current_um_open_conditional_orders(params) .await .context("query_all_current_um_open_conditional_orders request failed")?; info!(?response.rate_limits, "query_all_current_um_open_conditional_orders rate limits"); let data = response.data().await?; info!(?data, "query_all_current_um_open_conditional_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_all_current_um_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryAllCurrentUmOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryAllCurrentUmOpenOrdersParams::default(); // Make the API call let response = rest_client .query_all_current_um_open_orders(params) .await .context("query_all_current_um_open_orders request failed")?; info!(?response.rate_limits, "query_all_current_um_open_orders rate limits"); let data = response.data().await?; info!(?data, "query_all_current_um_open_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_all_margin_account_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryAllMarginAccountOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryAllMarginAccountOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_all_margin_account_orders(params) .await .context("query_all_margin_account_orders request failed")?; info!(?response.rate_limits, "query_all_margin_account_orders rate limits"); let data = response.data().await?; info!(?data, "query_all_margin_account_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_all_um_conditional_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryAllUmConditionalOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryAllUmConditionalOrdersParams::default(); // Make the API call let response = rest_client .query_all_um_conditional_orders(params) .await .context("query_all_um_conditional_orders request failed")?; info!(?response.rate_limits, "query_all_um_conditional_orders rate limits"); let data = response.data().await?; info!(?data, "query_all_um_conditional_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_all_um_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryAllUmOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryAllUmOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_all_um_orders(params) .await .context("query_all_um_orders request failed")?; info!(?response.rate_limits, "query_all_um_orders rate limits"); let data = response.data().await?; info!(?data, "query_all_um_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_cm_conditional_order_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryCmConditionalOrderHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryCmConditionalOrderHistoryParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_cm_conditional_order_history(params) .await .context("query_cm_conditional_order_history request failed")?; info!(?response.rate_limits, "query_cm_conditional_order_history rate limits"); let data = response.data().await?; info!(?data, "query_cm_conditional_order_history data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_cm_modify_order_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryCmModifyOrderHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryCmModifyOrderHistoryParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_cm_modify_order_history(params) .await .context("query_cm_modify_order_history request failed")?; info!(?response.rate_limits, "query_cm_modify_order_history rate limits"); let data = response.data().await?; info!(?data, "query_cm_modify_order_history data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_cm_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryCmOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryCmOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_cm_order(params) .await .context("query_cm_order request failed")?; info!(?response.rate_limits, "query_cm_order rate limits"); let data = response.data().await?; info!(?data, "query_cm_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_current_cm_open_conditional_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryCurrentCmOpenConditionalOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentCmOpenConditionalOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_current_cm_open_conditional_order(params) .await .context("query_current_cm_open_conditional_order request failed")?; info!(?response.rate_limits, "query_current_cm_open_conditional_order rate limits"); let data = response.data().await?; info!(?data, "query_current_cm_open_conditional_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_current_cm_open_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryCurrentCmOpenOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentCmOpenOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_current_cm_open_order(params) .await .context("query_current_cm_open_order request failed")?; info!(?response.rate_limits, "query_current_cm_open_order rate limits"); let data = response.data().await?; info!(?data, "query_current_cm_open_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_current_margin_open_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryCurrentMarginOpenOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentMarginOpenOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_current_margin_open_order(params) .await .context("query_current_margin_open_order request failed")?; info!(?response.rate_limits, "query_current_margin_open_order rate limits"); let data = response.data().await?; info!(?data, "query_current_margin_open_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_current_um_open_conditional_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryCurrentUmOpenConditionalOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentUmOpenConditionalOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_current_um_open_conditional_order(params) .await .context("query_current_um_open_conditional_order request failed")?; info!(?response.rate_limits, "query_current_um_open_conditional_order rate limits"); let data = response.data().await?; info!(?data, "query_current_um_open_conditional_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_current_um_open_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryCurrentUmOpenOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentUmOpenOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_current_um_open_order(params) .await .context("query_current_um_open_order request failed")?; info!(?response.rate_limits, "query_current_um_open_order rate limits"); let data = response.data().await?; info!(?data, "query_current_um_open_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_margin_account_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryMarginAccountOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_margin_account_order(params) .await .context("query_margin_account_order request failed")?; info!(?response.rate_limits, "query_margin_account_order rate limits"); let data = response.data().await?; info!(?data, "query_margin_account_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_margin_accounts_all_oco.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryMarginAccountsAllOcoParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountsAllOcoParams::default(); // Make the API call let response = rest_client .query_margin_accounts_all_oco(params) .await .context("query_margin_accounts_all_oco request failed")?; info!(?response.rate_limits, "query_margin_accounts_all_oco rate limits"); let data = response.data().await?; info!(?data, "query_margin_accounts_all_oco data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_margin_accounts_oco.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryMarginAccountsOcoParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountsOcoParams::default(); // Make the API call let response = rest_client .query_margin_accounts_oco(params) .await .context("query_margin_accounts_oco request failed")?; info!(?response.rate_limits, "query_margin_accounts_oco rate limits"); let data = response.data().await?; info!(?data, "query_margin_accounts_oco data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_margin_accounts_open_oco.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryMarginAccountsOpenOcoParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountsOpenOcoParams::default(); // Make the API call let response = rest_client .query_margin_accounts_open_oco(params) .await .context("query_margin_accounts_open_oco request failed")?; info!(?response.rate_limits, "query_margin_accounts_open_oco rate limits"); let data = response.data().await?; info!(?data, "query_margin_accounts_open_oco data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_um_conditional_order_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryUmConditionalOrderHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryUmConditionalOrderHistoryParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_um_conditional_order_history(params) .await .context("query_um_conditional_order_history request failed")?; info!(?response.rate_limits, "query_um_conditional_order_history rate limits"); let data = response.data().await?; info!(?data, "query_um_conditional_order_history data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_um_modify_order_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryUmModifyOrderHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryUmModifyOrderHistoryParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_um_modify_order_history(params) .await .context("query_um_modify_order_history request failed")?; info!(?response.rate_limits, "query_um_modify_order_history rate limits"); let data = response.data().await?; info!(?data, "query_um_modify_order_history data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_um_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryUmOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryUmOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_um_order(params) .await .context("query_um_order request failed")?; info!(?response.rate_limits, "query_um_order rate limits"); let data = response.data().await?; info!(?data, "query_um_order data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_users_cm_force_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryUsersCmForceOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryUsersCmForceOrdersParams::default(); // Make the API call let response = rest_client .query_users_cm_force_orders(params) .await .context("query_users_cm_force_orders request failed")?; info!(?response.rate_limits, "query_users_cm_force_orders rate limits"); let data = response.data().await?; info!(?data, "query_users_cm_force_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_users_margin_force_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryUsersMarginForceOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryUsersMarginForceOrdersParams::default(); // Make the API call let response = rest_client .query_users_margin_force_orders(params) .await .context("query_users_margin_force_orders request failed")?; info!(?response.rate_limits, "query_users_margin_force_orders rate limits"); let data = response.data().await?; info!(?data, "query_users_margin_force_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/query_users_um_force_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::QueryUsersUmForceOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = QueryUsersUmForceOrdersParams::default(); // Make the API call let response = rest_client .query_users_um_force_orders(params) .await .context("query_users_um_force_orders request failed")?; info!(?response.rate_limits, "query_users_um_force_orders rate limits"); let data = response.data().await?; info!(?data, "query_users_um_force_orders data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/toggle_bnb_burn_on_um_futures_trade.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::ToggleBnbBurnOnUmFuturesTradeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = ToggleBnbBurnOnUmFuturesTradeParams::builder("fee_burn_example".to_string()).build()?; // Make the API call let response = rest_client .toggle_bnb_burn_on_um_futures_trade(params) .await .context("toggle_bnb_burn_on_um_futures_trade request failed")?; info!(?response.rate_limits, "toggle_bnb_burn_on_um_futures_trade rate limits"); let data = response.data().await?; info!(?data, "toggle_bnb_burn_on_um_futures_trade data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/um_account_trade_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::UmAccountTradeListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = UmAccountTradeListParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .um_account_trade_list(params) .await .context("um_account_trade_list request failed")?; info!(?response.rate_limits, "um_account_trade_list rate limits"); let data = response.data().await?; info!(?data, "um_account_trade_list data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/trade_api/um_position_adl_quantile_estimation.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::{ DerivativesTradingPortfolioMarginRestApi, rest_api::UmPositionAdlQuantileEstimationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Setup the API parameters let params = UmPositionAdlQuantileEstimationParams::default(); // Make the API call let response = rest_client .um_position_adl_quantile_estimation(params) .await .context("um_position_adl_quantile_estimation request failed")?; info!(?response.rate_limits, "um_position_adl_quantile_estimation rate limits"); let data = response.data().await?; info!(?data, "um_position_adl_quantile_estimation data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/user_data_streams_api/close_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Make the API call let response = rest_client .close_user_data_stream() .await .context("close_user_data_stream request failed")?; info!(?response.rate_limits, "close_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "close_user_data_stream data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/user_data_streams_api/keepalive_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Make the API call let response = rest_client .keepalive_user_data_stream() .await .context("keepalive_user_data_stream request failed")?; info!(?response.rate_limits, "keepalive_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "keepalive_user_data_stream data"); Ok(()) } examples/derivatives_trading_portfolio_margin/rest_api/user_data_streams_api/start_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMargin REST API client let rest_client = DerivativesTradingPortfolioMarginRestApi::production(rest_conf); // Make the API call let response = rest_client .start_user_data_stream() .await .context("start_user_data_stream request failed")?; info!(?response.rate_limits, "start_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "start_user_data_stream data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/bnb_transfer.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::BnbTransferParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = BnbTransferParams::builder(dec!(1.0), "transfer_side_example".to_string()).build()?; // Make the API call let response = rest_client .bnb_transfer(params) .await .context("bnb_transfer request failed")?; info!(?response.rate_limits, "bnb_transfer rate limits"); let data = response.data().await?; info!(?data, "bnb_transfer data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/change_auto_repay_futures_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::ChangeAutoRepayFuturesStatusParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = ChangeAutoRepayFuturesStatusParams::builder("true".to_string()).build()?; // Make the API call let response = rest_client .change_auto_repay_futures_status(params) .await .context("change_auto_repay_futures_status request failed")?; info!(?response.rate_limits, "change_auto_repay_futures_status rate limits"); let data = response.data().await?; info!(?data, "change_auto_repay_futures_status data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/fund_auto_collection.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::FundAutoCollectionParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = FundAutoCollectionParams::default(); // Make the API call let response = rest_client .fund_auto_collection(params) .await .context("fund_auto_collection request failed")?; info!(?response.rate_limits, "fund_auto_collection rate limits"); let data = response.data().await?; info!(?data, "fund_auto_collection data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/fund_collection_by_asset.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::FundCollectionByAssetParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = FundCollectionByAssetParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .fund_collection_by_asset(params) .await .context("fund_collection_by_asset request failed")?; info!(?response.rate_limits, "fund_collection_by_asset rate limits"); let data = response.data().await?; info!(?data, "fund_collection_by_asset data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/get_auto_repay_futures_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::GetAutoRepayFuturesStatusParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = GetAutoRepayFuturesStatusParams::default(); // Make the API call let response = rest_client .get_auto_repay_futures_status(params) .await .context("get_auto_repay_futures_status request failed")?; info!(?response.rate_limits, "get_auto_repay_futures_status rate limits"); let data = response.data().await?; info!(?data, "get_auto_repay_futures_status data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/get_portfolio_margin_pro_account_balance.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::GetPortfolioMarginProAccountBalanceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = GetPortfolioMarginProAccountBalanceParams::default(); // Make the API call let response = rest_client .get_portfolio_margin_pro_account_balance(params) .await .context("get_portfolio_margin_pro_account_balance request failed")?; info!(?response.rate_limits, "get_portfolio_margin_pro_account_balance rate limits"); let data = response.data().await?; info!(?data, "get_portfolio_margin_pro_account_balance data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/get_portfolio_margin_pro_account_info.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::GetPortfolioMarginProAccountInfoParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = GetPortfolioMarginProAccountInfoParams::default(); // Make the API call let response = rest_client .get_portfolio_margin_pro_account_info(params) .await .context("get_portfolio_margin_pro_account_info request failed")?; info!(?response.rate_limits, "get_portfolio_margin_pro_account_info rate limits"); let data = response.data().await?; info!(?data, "get_portfolio_margin_pro_account_info data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/get_portfolio_margin_pro_span_account_info.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::GetPortfolioMarginProSpanAccountInfoParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = GetPortfolioMarginProSpanAccountInfoParams::default(); // Make the API call let response = rest_client .get_portfolio_margin_pro_span_account_info(params) .await .context("get_portfolio_margin_pro_span_account_info request failed")?; info!(?response.rate_limits, "get_portfolio_margin_pro_span_account_info rate limits"); let data = response.data().await?; info!(?data, "get_portfolio_margin_pro_span_account_info data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/get_transferable_earn_asset_balance_for_portfolio_margin.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::GetTransferableEarnAssetBalanceForPortfolioMarginParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = GetTransferableEarnAssetBalanceForPortfolioMarginParams::builder( "asset_example".to_string(), "transfer_type_example".to_string(), ) .build()?; // Make the API call let response = rest_client .get_transferable_earn_asset_balance_for_portfolio_margin(params) .await .context("get_transferable_earn_asset_balance_for_portfolio_margin request failed")?; info!(?response.rate_limits, "get_transferable_earn_asset_balance_for_portfolio_margin rate limits"); let data = response.data().await?; info!( ?data, "get_transferable_earn_asset_balance_for_portfolio_margin data" ); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/portfolio_margin_pro_bankruptcy_loan_repay.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::PortfolioMarginProBankruptcyLoanRepayParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = PortfolioMarginProBankruptcyLoanRepayParams::default(); // Make the API call let response = rest_client .portfolio_margin_pro_bankruptcy_loan_repay(params) .await .context("portfolio_margin_pro_bankruptcy_loan_repay request failed")?; info!(?response.rate_limits, "portfolio_margin_pro_bankruptcy_loan_repay rate limits"); let data = response.data().await?; info!(?data, "portfolio_margin_pro_bankruptcy_loan_repay data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/query_portfolio_margin_pro_bankruptcy_loan_amount.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::QueryPortfolioMarginProBankruptcyLoanAmountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = QueryPortfolioMarginProBankruptcyLoanAmountParams::default(); // Make the API call let response = rest_client .query_portfolio_margin_pro_bankruptcy_loan_amount(params) .await .context("query_portfolio_margin_pro_bankruptcy_loan_amount request failed")?; info!(?response.rate_limits, "query_portfolio_margin_pro_bankruptcy_loan_amount rate limits"); let data = response.data().await?; info!( ?data, "query_portfolio_margin_pro_bankruptcy_loan_amount data" ); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/query_portfolio_margin_pro_bankruptcy_loan_repay_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::QueryPortfolioMarginProBankruptcyLoanRepayHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = QueryPortfolioMarginProBankruptcyLoanRepayHistoryParams::default(); // Make the API call let response = rest_client .query_portfolio_margin_pro_bankruptcy_loan_repay_history(params) .await .context("query_portfolio_margin_pro_bankruptcy_loan_repay_history request failed")?; info!(?response.rate_limits, "query_portfolio_margin_pro_bankruptcy_loan_repay_history rate limits"); let data = response.data().await?; info!( ?data, "query_portfolio_margin_pro_bankruptcy_loan_repay_history data" ); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/query_portfolio_margin_pro_negative_balance_interest_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::QueryPortfolioMarginProNegativeBalanceInterestHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = QueryPortfolioMarginProNegativeBalanceInterestHistoryParams::default(); // Make the API call let response = rest_client .query_portfolio_margin_pro_negative_balance_interest_history(params) .await .context("query_portfolio_margin_pro_negative_balance_interest_history request failed")?; info!(?response.rate_limits, "query_portfolio_margin_pro_negative_balance_interest_history rate limits"); let data = response.data().await?; info!( ?data, "query_portfolio_margin_pro_negative_balance_interest_history data" ); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/repay_futures_negative_balance.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::RepayFuturesNegativeBalanceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = RepayFuturesNegativeBalanceParams::default(); // Make the API call let response = rest_client .repay_futures_negative_balance(params) .await .context("repay_futures_negative_balance request failed")?; info!(?response.rate_limits, "repay_futures_negative_balance rate limits"); let data = response.data().await?; info!(?data, "repay_futures_negative_balance data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/account_api/transfer_ldusdt_for_portfolio_margin.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::TransferLdusdtForPortfolioMarginParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = TransferLdusdtForPortfolioMarginParams::builder( "asset_example".to_string(), "transfer_type_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .transfer_ldusdt_for_portfolio_margin(params) .await .context("transfer_ldusdt_for_portfolio_margin request failed")?; info!(?response.rate_limits, "transfer_ldusdt_for_portfolio_margin rate limits"); let data = response.data().await?; info!(?data, "transfer_ldusdt_for_portfolio_margin data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/market_data_api/get_portfolio_margin_asset_leverage.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Make the API call let response = rest_client .get_portfolio_margin_asset_leverage() .await .context("get_portfolio_margin_asset_leverage request failed")?; info!(?response.rate_limits, "get_portfolio_margin_asset_leverage rate limits"); let data = response.data().await?; info!(?data, "get_portfolio_margin_asset_leverage data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/market_data_api/portfolio_margin_collateral_rate.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Make the API call let response = rest_client .portfolio_margin_collateral_rate() .await .context("portfolio_margin_collateral_rate request failed")?; info!(?response.rate_limits, "portfolio_margin_collateral_rate rate limits"); let data = response.data().await?; info!(?data, "portfolio_margin_collateral_rate data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/market_data_api/portfolio_margin_pro_tiered_collateral_rate.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::PortfolioMarginProTieredCollateralRateParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = PortfolioMarginProTieredCollateralRateParams::default(); // Make the API call let response = rest_client .portfolio_margin_pro_tiered_collateral_rate(params) .await .context("portfolio_margin_pro_tiered_collateral_rate request failed")?; info!(?response.rate_limits, "portfolio_margin_pro_tiered_collateral_rate rate limits"); let data = response.data().await?; info!(?data, "portfolio_margin_pro_tiered_collateral_rate data"); Ok(()) } examples/derivatives_trading_portfolio_margin_pro/rest_api/market_data_api/query_portfolio_margin_asset_index_price.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_portfolio_margin_pro::{ DerivativesTradingPortfolioMarginProRestApi, rest_api::QueryPortfolioMarginAssetIndexPriceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingPortfolioMarginPro REST API client let rest_client = DerivativesTradingPortfolioMarginProRestApi::production(rest_conf); // Setup the API parameters let params = QueryPortfolioMarginAssetIndexPriceParams::default(); // Make the API call let response = rest_client .query_portfolio_margin_asset_index_price(params) .await .context("query_portfolio_margin_asset_index_price request failed")?; info!(?response.rate_limits, "query_portfolio_margin_asset_index_price rate limits"); let data = response.data().await?; info!(?data, "query_portfolio_margin_asset_index_price data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/account_information_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::AccountInformationV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = AccountInformationV2Params::default(); // Make the API call let response = rest_client .account_information_v2(params) .await .context("account_information_v2 request failed")?; info!(?response.rate_limits, "account_information_v2 rate limits"); let data = response.data().await?; info!(?data, "account_information_v2 data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/account_information_v3.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::AccountInformationV3Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = AccountInformationV3Params::default(); // Make the API call let response = rest_client .account_information_v3(params) .await .context("account_information_v3 request failed")?; info!(?response.rate_limits, "account_information_v3 rate limits"); let data = response.data().await?; info!(?data, "account_information_v3 data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/futures_account_balance_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::FuturesAccountBalanceV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = FuturesAccountBalanceV2Params::default(); // Make the API call let response = rest_client .futures_account_balance_v2(params) .await .context("futures_account_balance_v2 request failed")?; info!(?response.rate_limits, "futures_account_balance_v2 rate limits"); let data = response.data().await?; info!(?data, "futures_account_balance_v2 data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/futures_account_balance_v3.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::FuturesAccountBalanceV3Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = FuturesAccountBalanceV3Params::default(); // Make the API call let response = rest_client .futures_account_balance_v3(params) .await .context("futures_account_balance_v3 request failed")?; info!(?response.rate_limits, "futures_account_balance_v3 rate limits"); let data = response.data().await?; info!(?data, "futures_account_balance_v3 data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/futures_account_configuration.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::FuturesAccountConfigurationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = FuturesAccountConfigurationParams::default(); // Make the API call let response = rest_client .futures_account_configuration(params) .await .context("futures_account_configuration request failed")?; info!(?response.rate_limits, "futures_account_configuration rate limits"); let data = response.data().await?; info!(?data, "futures_account_configuration data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/futures_trading_quantitative_rules_indicators.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::FuturesTradingQuantitativeRulesIndicatorsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = FuturesTradingQuantitativeRulesIndicatorsParams::default(); // Make the API call let response = rest_client .futures_trading_quantitative_rules_indicators(params) .await .context("futures_trading_quantitative_rules_indicators request failed")?; info!(?response.rate_limits, "futures_trading_quantitative_rules_indicators rate limits"); let data = response.data().await?; info!(?data, "futures_trading_quantitative_rules_indicators data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/get_bnb_burn_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetBnbBurnStatusParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetBnbBurnStatusParams::default(); // Make the API call let response = rest_client .get_bnb_burn_status(params) .await .context("get_bnb_burn_status request failed")?; info!(?response.rate_limits, "get_bnb_burn_status rate limits"); let data = response.data().await?; info!(?data, "get_bnb_burn_status data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/get_current_multi_assets_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetCurrentMultiAssetsModeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetCurrentMultiAssetsModeParams::default(); // Make the API call let response = rest_client .get_current_multi_assets_mode(params) .await .context("get_current_multi_assets_mode request failed")?; info!(?response.rate_limits, "get_current_multi_assets_mode rate limits"); let data = response.data().await?; info!(?data, "get_current_multi_assets_mode data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/get_current_position_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetCurrentPositionModeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetCurrentPositionModeParams::default(); // Make the API call let response = rest_client .get_current_position_mode(params) .await .context("get_current_position_mode request failed")?; info!(?response.rate_limits, "get_current_position_mode rate limits"); let data = response.data().await?; info!(?data, "get_current_position_mode data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/get_download_id_for_futures_order_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetDownloadIdForFuturesOrderHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetDownloadIdForFuturesOrderHistoryParams::builder(1623319461670, 1641782889000).build()?; // Make the API call let response = rest_client .get_download_id_for_futures_order_history(params) .await .context("get_download_id_for_futures_order_history request failed")?; info!(?response.rate_limits, "get_download_id_for_futures_order_history rate limits"); let data = response.data().await?; info!(?data, "get_download_id_for_futures_order_history data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/get_download_id_for_futures_trade_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetDownloadIdForFuturesTradeHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetDownloadIdForFuturesTradeHistoryParams::builder(1623319461670, 1641782889000).build()?; // Make the API call let response = rest_client .get_download_id_for_futures_trade_history(params) .await .context("get_download_id_for_futures_trade_history request failed")?; info!(?response.rate_limits, "get_download_id_for_futures_trade_history rate limits"); let data = response.data().await?; info!(?data, "get_download_id_for_futures_trade_history data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/get_download_id_for_futures_transaction_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetDownloadIdForFuturesTransactionHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetDownloadIdForFuturesTransactionHistoryParams::builder(1623319461670, 1641782889000) .build()?; // Make the API call let response = rest_client .get_download_id_for_futures_transaction_history(params) .await .context("get_download_id_for_futures_transaction_history request failed")?; info!(?response.rate_limits, "get_download_id_for_futures_transaction_history rate limits"); let data = response.data().await?; info!( ?data, "get_download_id_for_futures_transaction_history data" ); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/get_futures_order_history_download_link_by_id.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetFuturesOrderHistoryDownloadLinkByIdParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetFuturesOrderHistoryDownloadLinkByIdParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_futures_order_history_download_link_by_id(params) .await .context("get_futures_order_history_download_link_by_id request failed")?; info!(?response.rate_limits, "get_futures_order_history_download_link_by_id rate limits"); let data = response.data().await?; info!(?data, "get_futures_order_history_download_link_by_id data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/get_futures_trade_download_link_by_id.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetFuturesTradeDownloadLinkByIdParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetFuturesTradeDownloadLinkByIdParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_futures_trade_download_link_by_id(params) .await .context("get_futures_trade_download_link_by_id request failed")?; info!(?response.rate_limits, "get_futures_trade_download_link_by_id rate limits"); let data = response.data().await?; info!(?data, "get_futures_trade_download_link_by_id data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/get_futures_transaction_history_download_link_by_id.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetFuturesTransactionHistoryDownloadLinkByIdParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetFuturesTransactionHistoryDownloadLinkByIdParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_futures_transaction_history_download_link_by_id(params) .await .context("get_futures_transaction_history_download_link_by_id request failed")?; info!(?response.rate_limits, "get_futures_transaction_history_download_link_by_id rate limits"); let data = response.data().await?; info!( ?data, "get_futures_transaction_history_download_link_by_id data" ); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/get_income_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetIncomeHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetIncomeHistoryParams::default(); // Make the API call let response = rest_client .get_income_history(params) .await .context("get_income_history request failed")?; info!(?response.rate_limits, "get_income_history rate limits"); let data = response.data().await?; info!(?data, "get_income_history data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/notional_and_leverage_brackets.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::NotionalAndLeverageBracketsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = NotionalAndLeverageBracketsParams::default(); // Make the API call let response = rest_client .notional_and_leverage_brackets(params) .await .context("notional_and_leverage_brackets request failed")?; info!(?response.rate_limits, "notional_and_leverage_brackets rate limits"); let data = response.data().await?; info!(?data, "notional_and_leverage_brackets data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/query_user_rate_limit.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::QueryUserRateLimitParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QueryUserRateLimitParams::default(); // Make the API call let response = rest_client .query_user_rate_limit(params) .await .context("query_user_rate_limit request failed")?; info!(?response.rate_limits, "query_user_rate_limit rate limits"); let data = response.data().await?; info!(?data, "query_user_rate_limit data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/symbol_configuration.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::SymbolConfigurationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = SymbolConfigurationParams::default(); // Make the API call let response = rest_client .symbol_configuration(params) .await .context("symbol_configuration request failed")?; info!(?response.rate_limits, "symbol_configuration rate limits"); let data = response.data().await?; info!(?data, "symbol_configuration data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/toggle_bnb_burn_on_futures_trade.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::ToggleBnbBurnOnFuturesTradeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ToggleBnbBurnOnFuturesTradeParams::builder("fee_burn_example".to_string()).build()?; // Make the API call let response = rest_client .toggle_bnb_burn_on_futures_trade(params) .await .context("toggle_bnb_burn_on_futures_trade request failed")?; info!(?response.rate_limits, "toggle_bnb_burn_on_futures_trade rate limits"); let data = response.data().await?; info!(?data, "toggle_bnb_burn_on_futures_trade data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/account_api/user_commission_rate.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::UserCommissionRateParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = UserCommissionRateParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .user_commission_rate(params) .await .context("user_commission_rate request failed")?; info!(?response.rate_limits, "user_commission_rate rate limits"); let data = response.data().await?; info!(?data, "user_commission_rate data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/convert_api/accept_the_offered_quote.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::AcceptTheOfferedQuoteParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = AcceptTheOfferedQuoteParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .accept_the_offered_quote(params) .await .context("accept_the_offered_quote request failed")?; info!(?response.rate_limits, "accept_the_offered_quote rate limits"); let data = response.data().await?; info!(?data, "accept_the_offered_quote data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/convert_api/list_all_convert_pairs.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::ListAllConvertPairsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ListAllConvertPairsParams::default(); // Make the API call let response = rest_client .list_all_convert_pairs(params) .await .context("list_all_convert_pairs request failed")?; info!(?response.rate_limits, "list_all_convert_pairs rate limits"); let data = response.data().await?; info!(?data, "list_all_convert_pairs data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/convert_api/order_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::OrderStatusParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = OrderStatusParams::default(); // Make the API call let response = rest_client .order_status(params) .await .context("order_status request failed")?; info!(?response.rate_limits, "order_status rate limits"); let data = response.data().await?; info!(?data, "order_status data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/convert_api/send_quote_request.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::SendQuoteRequestParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = SendQuoteRequestParams::builder( "from_asset_example".to_string(), "to_asset_example".to_string(), ) .build()?; // Make the API call let response = rest_client .send_quote_request(params) .await .context("send_quote_request request failed")?; info!(?response.rate_limits, "send_quote_request rate limits"); let data = response.data().await?; info!(?data, "send_quote_request data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/basis.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{BasisContractTypeEnum, BasisParams, BasisPeriodEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = BasisParams::builder( "pair_example".to_string(), BasisContractTypeEnum::Perpetual, BasisPeriodEnum::Period5m, 30, ) .build()?; // Make the API call let response = rest_client .basis(params) .await .context("basis request failed")?; info!(?response.rate_limits, "basis rate limits"); let data = response.data().await?; info!(?data, "basis data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/check_server_time.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .check_server_time() .await .context("check_server_time request failed")?; info!(?response.rate_limits, "check_server_time rate limits"); let data = response.data().await?; info!(?data, "check_server_time data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/composite_index_symbol_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::CompositeIndexSymbolInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CompositeIndexSymbolInformationParams::default(); // Make the API call let response = rest_client .composite_index_symbol_information(params) .await .context("composite_index_symbol_information request failed")?; info!(?response.rate_limits, "composite_index_symbol_information rate limits"); let data = response.data().await?; info!(?data, "composite_index_symbol_information data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/compressed_aggregate_trades_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::CompressedAggregateTradesListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CompressedAggregateTradesListParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .compressed_aggregate_trades_list(params) .await .context("compressed_aggregate_trades_list request failed")?; info!(?response.rate_limits, "compressed_aggregate_trades_list rate limits"); let data = response.data().await?; info!(?data, "compressed_aggregate_trades_list data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/continuous_contract_kline_candlestick_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{ ContinuousContractKlineCandlestickDataContractTypeEnum, ContinuousContractKlineCandlestickDataIntervalEnum, ContinuousContractKlineCandlestickDataParams, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ContinuousContractKlineCandlestickDataParams::builder( "pair_example".to_string(), ContinuousContractKlineCandlestickDataContractTypeEnum::Perpetual, ContinuousContractKlineCandlestickDataIntervalEnum::Interval1m, ) .build()?; // Make the API call let response = rest_client .continuous_contract_kline_candlestick_data(params) .await .context("continuous_contract_kline_candlestick_data request failed")?; info!(?response.rate_limits, "continuous_contract_kline_candlestick_data rate limits"); let data = response.data().await?; info!(?data, "continuous_contract_kline_candlestick_data data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/exchange_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .exchange_information() .await .context("exchange_information request failed")?; info!(?response.rate_limits, "exchange_information rate limits"); let data = response.data().await?; info!(?data, "exchange_information data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/get_funding_rate_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetFundingRateHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetFundingRateHistoryParams::default(); // Make the API call let response = rest_client .get_funding_rate_history(params) .await .context("get_funding_rate_history request failed")?; info!(?response.rate_limits, "get_funding_rate_history rate limits"); let data = response.data().await?; info!(?data, "get_funding_rate_history data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/get_funding_rate_info.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .get_funding_rate_info() .await .context("get_funding_rate_info request failed")?; info!(?response.rate_limits, "get_funding_rate_info rate limits"); let data = response.data().await?; info!(?data, "get_funding_rate_info data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/index_price_kline_candlestick_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{IndexPriceKlineCandlestickDataIntervalEnum, IndexPriceKlineCandlestickDataParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = IndexPriceKlineCandlestickDataParams::builder( "pair_example".to_string(), IndexPriceKlineCandlestickDataIntervalEnum::Interval1m, ) .build()?; // Make the API call let response = rest_client .index_price_kline_candlestick_data(params) .await .context("index_price_kline_candlestick_data request failed")?; info!(?response.rate_limits, "index_price_kline_candlestick_data rate limits"); let data = response.data().await?; info!(?data, "index_price_kline_candlestick_data data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/kline_candlestick_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{KlineCandlestickDataIntervalEnum, KlineCandlestickDataParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = KlineCandlestickDataParams::builder( "symbol_example".to_string(), KlineCandlestickDataIntervalEnum::Interval1m, ) .build()?; // Make the API call let response = rest_client .kline_candlestick_data(params) .await .context("kline_candlestick_data request failed")?; info!(?response.rate_limits, "kline_candlestick_data rate limits"); let data = response.data().await?; info!(?data, "kline_candlestick_data data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/long_short_ratio.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{LongShortRatioParams, LongShortRatioPeriodEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = LongShortRatioParams::builder( "symbol_example".to_string(), LongShortRatioPeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .long_short_ratio(params) .await .context("long_short_ratio request failed")?; info!(?response.rate_limits, "long_short_ratio rate limits"); let data = response.data().await?; info!(?data, "long_short_ratio data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/mark_price.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::MarkPriceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = MarkPriceParams::default(); // Make the API call let response = rest_client .mark_price(params) .await .context("mark_price request failed")?; info!(?response.rate_limits, "mark_price rate limits"); let data = response.data().await?; info!(?data, "mark_price data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/mark_price_kline_candlestick_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{MarkPriceKlineCandlestickDataIntervalEnum, MarkPriceKlineCandlestickDataParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = MarkPriceKlineCandlestickDataParams::builder( "symbol_example".to_string(), MarkPriceKlineCandlestickDataIntervalEnum::Interval1m, ) .build()?; // Make the API call let response = rest_client .mark_price_kline_candlestick_data(params) .await .context("mark_price_kline_candlestick_data request failed")?; info!(?response.rate_limits, "mark_price_kline_candlestick_data rate limits"); let data = response.data().await?; info!(?data, "mark_price_kline_candlestick_data data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/multi_assets_mode_asset_index.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::MultiAssetsModeAssetIndexParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = MultiAssetsModeAssetIndexParams::default(); // Make the API call let response = rest_client .multi_assets_mode_asset_index(params) .await .context("multi_assets_mode_asset_index request failed")?; info!(?response.rate_limits, "multi_assets_mode_asset_index rate limits"); let data = response.data().await?; info!(?data, "multi_assets_mode_asset_index data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/old_trades_lookup.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::OldTradesLookupParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = OldTradesLookupParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .old_trades_lookup(params) .await .context("old_trades_lookup request failed")?; info!(?response.rate_limits, "old_trades_lookup rate limits"); let data = response.data().await?; info!(?data, "old_trades_lookup data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/open_interest.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::OpenInterestParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = OpenInterestParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .open_interest(params) .await .context("open_interest request failed")?; info!(?response.rate_limits, "open_interest rate limits"); let data = response.data().await?; info!(?data, "open_interest data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/open_interest_statistics.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{OpenInterestStatisticsParams, OpenInterestStatisticsPeriodEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = OpenInterestStatisticsParams::builder( "symbol_example".to_string(), OpenInterestStatisticsPeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .open_interest_statistics(params) .await .context("open_interest_statistics request failed")?; info!(?response.rate_limits, "open_interest_statistics rate limits"); let data = response.data().await?; info!(?data, "open_interest_statistics data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/order_book.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::OrderBookParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = OrderBookParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .order_book(params) .await .context("order_book request failed")?; info!(?response.rate_limits, "order_book rate limits"); let data = response.data().await?; info!(?data, "order_book data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/premium_index_kline_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{PremiumIndexKlineDataIntervalEnum, PremiumIndexKlineDataParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = PremiumIndexKlineDataParams::builder( "symbol_example".to_string(), PremiumIndexKlineDataIntervalEnum::Interval1m, ) .build()?; // Make the API call let response = rest_client .premium_index_kline_data(params) .await .context("premium_index_kline_data request failed")?; info!(?response.rate_limits, "premium_index_kline_data rate limits"); let data = response.data().await?; info!(?data, "premium_index_kline_data data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/quarterly_contract_settlement_price.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::QuarterlyContractSettlementPriceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QuarterlyContractSettlementPriceParams::builder("pair_example".to_string()).build()?; // Make the API call let response = rest_client .quarterly_contract_settlement_price(params) .await .context("quarterly_contract_settlement_price request failed")?; info!(?response.rate_limits, "quarterly_contract_settlement_price rate limits"); let data = response.data().await?; info!(?data, "quarterly_contract_settlement_price data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/query_index_price_constituents.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::QueryIndexPriceConstituentsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QueryIndexPriceConstituentsParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_index_price_constituents(params) .await .context("query_index_price_constituents request failed")?; info!(?response.rate_limits, "query_index_price_constituents rate limits"); let data = response.data().await?; info!(?data, "query_index_price_constituents data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/query_insurance_fund_balance_snapshot.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::QueryInsuranceFundBalanceSnapshotParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QueryInsuranceFundBalanceSnapshotParams::default(); // Make the API call let response = rest_client .query_insurance_fund_balance_snapshot(params) .await .context("query_insurance_fund_balance_snapshot request failed")?; info!(?response.rate_limits, "query_insurance_fund_balance_snapshot rate limits"); let data = response.data().await?; info!(?data, "query_insurance_fund_balance_snapshot data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/recent_trades_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::RecentTradesListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = RecentTradesListParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .recent_trades_list(params) .await .context("recent_trades_list request failed")?; info!(?response.rate_limits, "recent_trades_list rate limits"); let data = response.data().await?; info!(?data, "recent_trades_list data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/symbol_order_book_ticker.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::SymbolOrderBookTickerParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = SymbolOrderBookTickerParams::default(); // Make the API call let response = rest_client .symbol_order_book_ticker(params) .await .context("symbol_order_book_ticker request failed")?; info!(?response.rate_limits, "symbol_order_book_ticker rate limits"); let data = response.data().await?; info!(?data, "symbol_order_book_ticker data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/symbol_price_ticker.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::SymbolPriceTickerParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = SymbolPriceTickerParams::default(); // Make the API call let response = rest_client .symbol_price_ticker(params) .await .context("symbol_price_ticker request failed")?; info!(?response.rate_limits, "symbol_price_ticker rate limits"); let data = response.data().await?; info!(?data, "symbol_price_ticker data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/symbol_price_ticker_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::SymbolPriceTickerV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = SymbolPriceTickerV2Params::default(); // Make the API call let response = rest_client .symbol_price_ticker_v2(params) .await .context("symbol_price_ticker_v2 request failed")?; info!(?response.rate_limits, "symbol_price_ticker_v2 rate limits"); let data = response.data().await?; info!(?data, "symbol_price_ticker_v2 data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/taker_buy_sell_volume.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{TakerBuySellVolumeParams, TakerBuySellVolumePeriodEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = TakerBuySellVolumeParams::builder( "symbol_example".to_string(), TakerBuySellVolumePeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .taker_buy_sell_volume(params) .await .context("taker_buy_sell_volume request failed")?; info!(?response.rate_limits, "taker_buy_sell_volume rate limits"); let data = response.data().await?; info!(?data, "taker_buy_sell_volume data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/test_connectivity.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .test_connectivity() .await .context("test_connectivity request failed")?; info!(?response.rate_limits, "test_connectivity rate limits"); let data = response.data().await?; info!(?data, "test_connectivity data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/ticker24hr_price_change_statistics.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::Ticker24hrPriceChangeStatisticsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = Ticker24hrPriceChangeStatisticsParams::default(); // Make the API call let response = rest_client .ticker24hr_price_change_statistics(params) .await .context("ticker24hr_price_change_statistics request failed")?; info!(?response.rate_limits, "ticker24hr_price_change_statistics rate limits"); let data = response.data().await?; info!(?data, "ticker24hr_price_change_statistics data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/top_trader_long_short_ratio_accounts.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{TopTraderLongShortRatioAccountsParams, TopTraderLongShortRatioAccountsPeriodEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = TopTraderLongShortRatioAccountsParams::builder( "symbol_example".to_string(), TopTraderLongShortRatioAccountsPeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .top_trader_long_short_ratio_accounts(params) .await .context("top_trader_long_short_ratio_accounts request failed")?; info!(?response.rate_limits, "top_trader_long_short_ratio_accounts rate limits"); let data = response.data().await?; info!(?data, "top_trader_long_short_ratio_accounts data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/market_data_api/top_trader_long_short_ratio_positions.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{ TopTraderLongShortRatioPositionsParams, TopTraderLongShortRatioPositionsPeriodEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = TopTraderLongShortRatioPositionsParams::builder( "symbol_example".to_string(), TopTraderLongShortRatioPositionsPeriodEnum::Period5m, ) .build()?; // Make the API call let response = rest_client .top_trader_long_short_ratio_positions(params) .await .context("top_trader_long_short_ratio_positions request failed")?; info!(?response.rate_limits, "top_trader_long_short_ratio_positions rate limits"); let data = response.data().await?; info!(?data, "top_trader_long_short_ratio_positions data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/portfolio_margin_endpoints_api/classic_portfolio_margin_account_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::ClassicPortfolioMarginAccountInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ClassicPortfolioMarginAccountInformationParams::builder("asset_example".to_string()) .build()?; // Make the API call let response = rest_client .classic_portfolio_margin_account_information(params) .await .context("classic_portfolio_margin_account_information request failed")?; info!(?response.rate_limits, "classic_portfolio_margin_account_information rate limits"); let data = response.data().await?; info!(?data, "classic_portfolio_margin_account_information data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/account_trade_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::AccountTradeListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = AccountTradeListParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .account_trade_list(params) .await .context("account_trade_list request failed")?; info!(?response.rate_limits, "account_trade_list rate limits"); let data = response.data().await?; info!(?data, "account_trade_list data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/all_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::AllOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = AllOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .all_orders(params) .await .context("all_orders request failed")?; info!(?response.rate_limits, "all_orders rate limits"); let data = response.data().await?; info!(?data, "all_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/auto_cancel_all_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::AutoCancelAllOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = AutoCancelAllOpenOrdersParams::builder("symbol_example".to_string(), 789).build()?; // Make the API call let response = rest_client .auto_cancel_all_open_orders(params) .await .context("auto_cancel_all_open_orders request failed")?; info!(?response.rate_limits, "auto_cancel_all_open_orders rate limits"); let data = response.data().await?; info!(?data, "auto_cancel_all_open_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/cancel_algo_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::CancelAlgoOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CancelAlgoOrderParams::default(); // Make the API call let response = rest_client .cancel_algo_order(params) .await .context("cancel_algo_order request failed")?; info!(?response.rate_limits, "cancel_algo_order rate limits"); let data = response.data().await?; info!(?data, "cancel_algo_order data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/cancel_all_algo_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::CancelAllAlgoOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CancelAllAlgoOpenOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_all_algo_open_orders(params) .await .context("cancel_all_algo_open_orders request failed")?; info!(?response.rate_limits, "cancel_all_algo_open_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_all_algo_open_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/cancel_all_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::CancelAllOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CancelAllOpenOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_all_open_orders(params) .await .context("cancel_all_open_orders request failed")?; info!(?response.rate_limits, "cancel_all_open_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_all_open_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/cancel_multiple_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::CancelMultipleOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CancelMultipleOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_multiple_orders(params) .await .context("cancel_multiple_orders request failed")?; info!(?response.rate_limits, "cancel_multiple_orders rate limits"); let data = response.data().await?; info!(?data, "cancel_multiple_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/cancel_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::CancelOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CancelOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .cancel_order(params) .await .context("cancel_order request failed")?; info!(?response.rate_limits, "cancel_order rate limits"); let data = response.data().await?; info!(?data, "cancel_order data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/change_initial_leverage.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::ChangeInitialLeverageParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ChangeInitialLeverageParams::builder("symbol_example".to_string(), 789).build()?; // Make the API call let response = rest_client .change_initial_leverage(params) .await .context("change_initial_leverage request failed")?; info!(?response.rate_limits, "change_initial_leverage rate limits"); let data = response.data().await?; info!(?data, "change_initial_leverage data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/change_margin_type.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{ChangeMarginTypeMarginTypeEnum, ChangeMarginTypeParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ChangeMarginTypeParams::builder( "symbol_example".to_string(), ChangeMarginTypeMarginTypeEnum::Isolated, ) .build()?; // Make the API call let response = rest_client .change_margin_type(params) .await .context("change_margin_type request failed")?; info!(?response.rate_limits, "change_margin_type rate limits"); let data = response.data().await?; info!(?data, "change_margin_type data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/change_multi_assets_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::ChangeMultiAssetsModeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ChangeMultiAssetsModeParams::builder("multi_assets_margin_example".to_string()).build()?; // Make the API call let response = rest_client .change_multi_assets_mode(params) .await .context("change_multi_assets_mode request failed")?; info!(?response.rate_limits, "change_multi_assets_mode rate limits"); let data = response.data().await?; info!(?data, "change_multi_assets_mode data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/change_position_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::ChangePositionModeParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ChangePositionModeParams::builder("dual_side_position_example".to_string()).build()?; // Make the API call let response = rest_client .change_position_mode(params) .await .context("change_position_mode request failed")?; info!(?response.rate_limits, "change_position_mode rate limits"); let data = response.data().await?; info!(?data, "change_position_mode data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/current_all_algo_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::CurrentAllAlgoOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CurrentAllAlgoOpenOrdersParams::default(); // Make the API call let response = rest_client .current_all_algo_open_orders(params) .await .context("current_all_algo_open_orders request failed")?; info!(?response.rate_limits, "current_all_algo_open_orders rate limits"); let data = response.data().await?; info!(?data, "current_all_algo_open_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/current_all_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::CurrentAllOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = CurrentAllOpenOrdersParams::default(); // Make the API call let response = rest_client .current_all_open_orders(params) .await .context("current_all_open_orders request failed")?; info!(?response.rate_limits, "current_all_open_orders rate limits"); let data = response.data().await?; info!(?data, "current_all_open_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/get_order_modify_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetOrderModifyHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetOrderModifyHistoryParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .get_order_modify_history(params) .await .context("get_order_modify_history request failed")?; info!(?response.rate_limits, "get_order_modify_history rate limits"); let data = response.data().await?; info!(?data, "get_order_modify_history data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/get_position_margin_change_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::GetPositionMarginChangeHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = GetPositionMarginChangeHistoryParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .get_position_margin_change_history(params) .await .context("get_position_margin_change_history request failed")?; info!(?response.rate_limits, "get_position_margin_change_history rate limits"); let data = response.data().await?; info!(?data, "get_position_margin_change_history data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/modify_isolated_position_margin.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::ModifyIsolatedPositionMarginParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ModifyIsolatedPositionMarginParams::builder( "symbol_example".to_string(), dec!(1.0), "r#type_example".to_string(), ) .build()?; // Make the API call let response = rest_client .modify_isolated_position_margin(params) .await .context("modify_isolated_position_margin request failed")?; info!(?response.rate_limits, "modify_isolated_position_margin rate limits"); let data = response.data().await?; info!(?data, "modify_isolated_position_margin data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/modify_multiple_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::ModifyMultipleOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ModifyMultipleOrdersParams::builder(vec![]).build()?; // Make the API call let response = rest_client .modify_multiple_orders(params) .await .context("modify_multiple_orders request failed")?; info!(?response.rate_limits, "modify_multiple_orders rate limits"); let data = response.data().await?; info!(?data, "modify_multiple_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/modify_order.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{ModifyOrderParams, ModifyOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = ModifyOrderParams::builder( "symbol_example".to_string(), ModifyOrderSideEnum::Buy, dec!(1.0), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .modify_order(params) .await .context("modify_order request failed")?; info!(?response.rate_limits, "modify_order rate limits"); let data = response.data().await?; info!(?data, "modify_order data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/new_algo_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{NewAlgoOrderParams, NewAlgoOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = NewAlgoOrderParams::builder( "algo_type_example".to_string(), "symbol_example".to_string(), NewAlgoOrderSideEnum::Buy, "r#type_example".to_string(), ) .build()?; // Make the API call let response = rest_client .new_algo_order(params) .await .context("new_algo_order request failed")?; info!(?response.rate_limits, "new_algo_order rate limits"); let data = response.data().await?; info!(?data, "new_algo_order data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/new_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{NewOrderParams, NewOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = NewOrderParams::builder( "symbol_example".to_string(), NewOrderSideEnum::Buy, "r#type_example".to_string(), ) .build()?; // Make the API call let response = rest_client .new_order(params) .await .context("new_order request failed")?; info!(?response.rate_limits, "new_order rate limits"); let data = response.data().await?; info!(?data, "new_order data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/place_multiple_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::PlaceMultipleOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = PlaceMultipleOrdersParams::builder(vec![]).build()?; // Make the API call let response = rest_client .place_multiple_orders(params) .await .context("place_multiple_orders request failed")?; info!(?response.rate_limits, "place_multiple_orders rate limits"); let data = response.data().await?; info!(?data, "place_multiple_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/position_adl_quantile_estimation.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::PositionAdlQuantileEstimationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = PositionAdlQuantileEstimationParams::default(); // Make the API call let response = rest_client .position_adl_quantile_estimation(params) .await .context("position_adl_quantile_estimation request failed")?; info!(?response.rate_limits, "position_adl_quantile_estimation rate limits"); let data = response.data().await?; info!(?data, "position_adl_quantile_estimation data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/position_information_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::PositionInformationV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = PositionInformationV2Params::default(); // Make the API call let response = rest_client .position_information_v2(params) .await .context("position_information_v2 request failed")?; info!(?response.rate_limits, "position_information_v2 rate limits"); let data = response.data().await?; info!(?data, "position_information_v2 data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/position_information_v3.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::PositionInformationV3Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = PositionInformationV3Params::default(); // Make the API call let response = rest_client .position_information_v3(params) .await .context("position_information_v3 request failed")?; info!(?response.rate_limits, "position_information_v3 rate limits"); let data = response.data().await?; info!(?data, "position_information_v3 data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/query_algo_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::QueryAlgoOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QueryAlgoOrderParams::default(); // Make the API call let response = rest_client .query_algo_order(params) .await .context("query_algo_order request failed")?; info!(?response.rate_limits, "query_algo_order rate limits"); let data = response.data().await?; info!(?data, "query_algo_order data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/query_all_algo_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::QueryAllAlgoOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QueryAllAlgoOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_all_algo_orders(params) .await .context("query_all_algo_orders request failed")?; info!(?response.rate_limits, "query_all_algo_orders rate limits"); let data = response.data().await?; info!(?data, "query_all_algo_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/query_current_open_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::QueryCurrentOpenOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentOpenOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_current_open_order(params) .await .context("query_current_open_order request failed")?; info!(?response.rate_limits, "query_current_open_order rate limits"); let data = response.data().await?; info!(?data, "query_current_open_order data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/query_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::QueryOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = QueryOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_order(params) .await .context("query_order request failed")?; info!(?response.rate_limits, "query_order rate limits"); let data = response.data().await?; info!(?data, "query_order data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/test_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::{TestOrderParams, TestOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = TestOrderParams::builder( "symbol_example".to_string(), TestOrderSideEnum::Buy, "r#type_example".to_string(), ) .build()?; // Make the API call let response = rest_client .test_order(params) .await .context("test_order request failed")?; info!(?response.rate_limits, "test_order rate limits"); let data = response.data().await?; info!(?data, "test_order data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/trade_api/users_force_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesRestApi, rest_api::UsersForceOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Setup the API parameters let params = UsersForceOrdersParams::default(); // Make the API call let response = rest_client .users_force_orders(params) .await .context("users_force_orders request failed")?; info!(?response.rate_limits, "users_force_orders rate limits"); let data = response.data().await?; info!(?data, "users_force_orders data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/user_data_streams_api/close_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .close_user_data_stream() .await .context("close_user_data_stream request failed")?; info!(?response.rate_limits, "close_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "close_user_data_stream data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/user_data_streams_api/keepalive_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .keepalive_user_data_stream() .await .context("keepalive_user_data_stream request failed")?; info!(?response.rate_limits, "keepalive_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "keepalive_user_data_stream data"); Ok(()) } examples/derivatives_trading_usds_futures/rest_api/user_data_streams_api/start_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures REST API client let rest_client = DerivativesTradingUsdsFuturesRestApi::production(rest_conf); // Make the API call let response = rest_client .start_user_data_stream() .await .context("start_user_data_stream request failed")?; info!(?response.rate_limits, "start_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "start_user_data_stream data"); Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/account_api/account_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::AccountInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = AccountInformationParams::default(); // Make the WS API call let response = connection .account_information(params) .await .context("account_information request failed")?; info!(?response.rate_limits, "account_information rate limits"); let data = response.data()?; info!(?data, "account_information data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/account_api/account_information_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::AccountInformationV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = AccountInformationV2Params::default(); // Make the WS API call let response = connection .account_information_v2(params) .await .context("account_information_v2 request failed")?; info!(?response.rate_limits, "account_information_v2 rate limits"); let data = response.data()?; info!(?data, "account_information_v2 data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/account_api/futures_account_balance.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::FuturesAccountBalanceParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = FuturesAccountBalanceParams::default(); // Make the WS API call let response = connection .futures_account_balance(params) .await .context("futures_account_balance request failed")?; info!(?response.rate_limits, "futures_account_balance rate limits"); let data = response.data()?; info!(?data, "futures_account_balance data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/account_api/futures_account_balance_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::FuturesAccountBalanceV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = FuturesAccountBalanceV2Params::default(); // Make the WS API call let response = connection .futures_account_balance_v2(params) .await .context("futures_account_balance_v2 request failed")?; info!(?response.rate_limits, "futures_account_balance_v2 rate limits"); let data = response.data()?; info!(?data, "futures_account_balance_v2 data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/market_data_api/order_book.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::OrderBookParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderBookParams::builder("symbol_example".to_string()).build()?; // Make the WS API call let response = connection .order_book(params) .await .context("order_book request failed")?; info!(?response.rate_limits, "order_book rate limits"); let data = response.data()?; info!(?data, "order_book data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/market_data_api/symbol_order_book_ticker.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::SymbolOrderBookTickerParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = SymbolOrderBookTickerParams::default(); // Make the WS API call let response = connection .symbol_order_book_ticker(params) .await .context("symbol_order_book_ticker request failed")?; info!(?response.rate_limits, "symbol_order_book_ticker rate limits"); let data = response.data()?; info!(?data, "symbol_order_book_ticker data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/market_data_api/symbol_price_ticker.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::SymbolPriceTickerParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = SymbolPriceTickerParams::default(); // Make the WS API call let response = connection .symbol_price_ticker(params) .await .context("symbol_price_ticker request failed")?; info!(?response.rate_limits, "symbol_price_ticker rate limits"); let data = response.data()?; info!(?data, "symbol_price_ticker data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/trade_api/cancel_algo_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::CancelAlgoOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = CancelAlgoOrderParams::default(); // Make the WS API call let response = connection .cancel_algo_order(params) .await .context("cancel_algo_order request failed")?; info!(?response.rate_limits, "cancel_algo_order rate limits"); let data = response.data()?; info!(?data, "cancel_algo_order data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/trade_api/cancel_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::CancelOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = CancelOrderParams::builder("symbol_example".to_string()).build()?; // Make the WS API call let response = connection .cancel_order(params) .await .context("cancel_order request failed")?; info!(?response.rate_limits, "cancel_order rate limits"); let data = response.data()?; info!(?data, "cancel_order data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/trade_api/modify_order.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::{ModifyOrderParams, ModifyOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = ModifyOrderParams::builder( "symbol_example".to_string(), ModifyOrderSideEnum::Buy, dec!(1.0), dec!(1.0), ) .build()?; // Make the WS API call let response = connection .modify_order(params) .await .context("modify_order request failed")?; info!(?response.rate_limits, "modify_order rate limits"); let data = response.data()?; info!(?data, "modify_order data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/trade_api/new_algo_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::{NewAlgoOrderParams, NewAlgoOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = NewAlgoOrderParams::builder( "algo_type_example".to_string(), "symbol_example".to_string(), NewAlgoOrderSideEnum::Buy, "r#type_example".to_string(), ) .build()?; // Make the WS API call let response = connection .new_algo_order(params) .await .context("new_algo_order request failed")?; info!(?response.rate_limits, "new_algo_order rate limits"); let data = response.data()?; info!(?data, "new_algo_order data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/trade_api/new_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::{NewOrderParams, NewOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = NewOrderParams::builder( "symbol_example".to_string(), NewOrderSideEnum::Buy, "r#type_example".to_string(), ) .build()?; // Make the WS API call let response = connection .new_order(params) .await .context("new_order request failed")?; info!(?response.rate_limits, "new_order rate limits"); let data = response.data()?; info!(?data, "new_order data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/trade_api/position_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::PositionInformationParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = PositionInformationParams::default(); // Make the WS API call let response = connection .position_information(params) .await .context("position_information request failed")?; info!(?response.rate_limits, "position_information rate limits"); let data = response.data()?; info!(?data, "position_information data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/trade_api/position_information_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::PositionInformationV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = PositionInformationV2Params::default(); // Make the WS API call let response = connection .position_information_v2(params) .await .context("position_information_v2 request failed")?; info!(?response.rate_limits, "position_information_v2 rate limits"); let data = response.data()?; info!(?data, "position_information_v2 data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/trade_api/query_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::QueryOrderParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = QueryOrderParams::builder("symbol_example".to_string()).build()?; // Make the WS API call let response = connection .query_order(params) .await .context("query_order request failed")?; info!(?response.rate_limits, "query_order rate limits"); let data = response.data()?; info!(?data, "query_order data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/user_data_streams_api/close_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::CloseUserDataStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = CloseUserDataStreamParams::default(); // Make the WS API call let response = connection .close_user_data_stream(params) .await .context("close_user_data_stream request failed")?; info!(?response.rate_limits, "close_user_data_stream rate limits"); let data = response.data()?; info!(?data, "close_user_data_stream data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/user_data_streams_api/keepalive_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::KeepaliveUserDataStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = KeepaliveUserDataStreamParams::default(); // Make the WS API call let response = connection .keepalive_user_data_stream(params) .await .context("keepalive_user_data_stream request failed")?; info!(?response.rate_limits, "keepalive_user_data_stream rate limits"); let data = response.data()?; info!(?data, "keepalive_user_data_stream data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_api/user_data_streams_api/start_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsApi, websocket_api::StartUserDataStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DerivativesTradingUsdsFutures WebSocket API client let ws_api_client = DerivativesTradingUsdsFuturesWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = StartUserDataStreamParams::default(); // Make the WS API call let response = connection .start_user_data_stream(params) .await .context("start_user_data_stream request failed")?; info!(?response.rate_limits, "start_user_data_stream rate limits"); let data = response.data()?; info!(?data, "start_user_data_stream data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/aggregate_trade_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::AggregateTradeStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AggregateTradeStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .aggregate_trade_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/all_book_tickers_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::AllBookTickersStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllBookTickersStreamParams::default(); // Subscribe to the stream let stream = connection .all_book_tickers_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/all_market_liquidation_order_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::AllMarketLiquidationOrderStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllMarketLiquidationOrderStreamsParams::default(); // Subscribe to the stream let stream = connection .all_market_liquidation_order_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/all_market_mini_tickers_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::AllMarketMiniTickersStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllMarketMiniTickersStreamParams::default(); // Subscribe to the stream let stream = connection .all_market_mini_tickers_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/all_market_tickers_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::AllMarketTickersStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllMarketTickersStreamsParams::default(); // Subscribe to the stream let stream = connection .all_market_tickers_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/composite_index_symbol_information_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::CompositeIndexSymbolInformationStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = CompositeIndexSymbolInformationStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .composite_index_symbol_information_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/continuous_contract_kline_candlestick_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::ContinuousContractKlineCandlestickStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = ContinuousContractKlineCandlestickStreamsParams::builder( "btcusdt".to_string(), "next_quarter".to_string(), "1m".to_string(), ) .build()?; // Subscribe to the stream let stream = connection .continuous_contract_kline_candlestick_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/contract_info_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::ContractInfoStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = ContractInfoStreamParams::default(); // Subscribe to the stream let stream = connection .contract_info_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/diff_book_depth_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::DiffBookDepthStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = DiffBookDepthStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .diff_book_depth_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/individual_symbol_book_ticker_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::IndividualSymbolBookTickerStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = IndividualSymbolBookTickerStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .individual_symbol_book_ticker_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/individual_symbol_mini_ticker_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::IndividualSymbolMiniTickerStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = IndividualSymbolMiniTickerStreamParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .individual_symbol_mini_ticker_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/individual_symbol_ticker_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::IndividualSymbolTickerStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = IndividualSymbolTickerStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .individual_symbol_ticker_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/kline_candlestick_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::KlineCandlestickStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = KlineCandlestickStreamsParams::builder("btcusdt".to_string(), "1m".to_string()).build()?; // Subscribe to the stream let stream = connection .kline_candlestick_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/liquidation_order_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::LiquidationOrderStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = LiquidationOrderStreamsParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .liquidation_order_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/mark_price_stream.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::MarkPriceStreamParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = MarkPriceStreamParams::builder("btcusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .mark_price_stream(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/mark_price_stream_for_all_market.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::MarkPriceStreamForAllMarketParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = MarkPriceStreamForAllMarketParams::default(); // Subscribe to the stream let stream = connection .mark_price_stream_for_all_market(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/multi_assets_mode_asset_index.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::MultiAssetsModeAssetIndexParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = MultiAssetsModeAssetIndexParams::default(); // Subscribe to the stream let stream = connection .multi_assets_mode_asset_index(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/derivatives_trading_usds_futures/websocket_streams/partial_book_depth_streams.rs // Class name: websocket_market_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::derivatives_trading_usds_futures::{ DerivativesTradingUsdsFuturesWsStreams, websocket_streams::PartialBookDepthStreamsParams, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the DerivativesTradingUsdsFutures WebSocket Streams client let ws_streams_client = DerivativesTradingUsdsFuturesWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = PartialBookDepthStreamsParams::builder("btcusdt".to_string(), 10).build()?; // Subscribe to the stream let stream = connection .partial_book_depth_streams(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/dual_investment/rest_api/market_data_api/get_dual_investment_product_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::dual_investment::{ DualInvestmentRestApi, rest_api::GetDualInvestmentProductListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DualInvestment REST API client let rest_client = DualInvestmentRestApi::production(rest_conf); // Setup the API parameters let params = GetDualInvestmentProductListParams::builder( "option_type_example".to_string(), "exercised_coin_example".to_string(), "invest_coin_example".to_string(), ) .build()?; // Make the API call let response = rest_client .get_dual_investment_product_list(params) .await .context("get_dual_investment_product_list request failed")?; info!(?response.rate_limits, "get_dual_investment_product_list rate limits"); let data = response.data().await?; info!(?data, "get_dual_investment_product_list data"); Ok(()) } examples/dual_investment/rest_api/trade_api/change_auto_compound_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::dual_investment::{ DualInvestmentRestApi, rest_api::ChangeAutoCompoundStatusParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DualInvestment REST API client let rest_client = DualInvestmentRestApi::production(rest_conf); // Setup the API parameters let params = ChangeAutoCompoundStatusParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .change_auto_compound_status(params) .await .context("change_auto_compound_status request failed")?; info!(?response.rate_limits, "change_auto_compound_status rate limits"); let data = response.data().await?; info!(?data, "change_auto_compound_status data"); Ok(()) } examples/dual_investment/rest_api/trade_api/check_dual_investment_accounts.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::dual_investment::{ DualInvestmentRestApi, rest_api::CheckDualInvestmentAccountsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DualInvestment REST API client let rest_client = DualInvestmentRestApi::production(rest_conf); // Setup the API parameters let params = CheckDualInvestmentAccountsParams::default(); // Make the API call let response = rest_client .check_dual_investment_accounts(params) .await .context("check_dual_investment_accounts request failed")?; info!(?response.rate_limits, "check_dual_investment_accounts rate limits"); let data = response.data().await?; info!(?data, "check_dual_investment_accounts data"); Ok(()) } examples/dual_investment/rest_api/trade_api/get_dual_investment_positions.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::dual_investment::{ DualInvestmentRestApi, rest_api::GetDualInvestmentPositionsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DualInvestment REST API client let rest_client = DualInvestmentRestApi::production(rest_conf); // Setup the API parameters let params = GetDualInvestmentPositionsParams::default(); // Make the API call let response = rest_client .get_dual_investment_positions(params) .await .context("get_dual_investment_positions request failed")?; info!(?response.rate_limits, "get_dual_investment_positions rate limits"); let data = response.data().await?; info!(?data, "get_dual_investment_positions data"); Ok(()) } examples/dual_investment/rest_api/trade_api/subscribe_dual_investment_products.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::dual_investment::{ DualInvestmentRestApi, rest_api::SubscribeDualInvestmentProductsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the DualInvestment REST API client let rest_client = DualInvestmentRestApi::production(rest_conf); // Setup the API parameters let params = SubscribeDualInvestmentProductsParams::builder( "id_example".to_string(), "1".to_string(), dec!(1.0), "NONE".to_string(), ) .build()?; // Make the API call let response = rest_client .subscribe_dual_investment_products(params) .await .context("subscribe_dual_investment_products request failed")?; info!(?response.rate_limits, "subscribe_dual_investment_products rate limits"); let data = response.data().await?; info!(?data, "subscribe_dual_investment_products data"); Ok(()) } examples/fiat/rest_api/fiat_api/fiat_withdraw.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::fiat::{FiatRestApi, rest_api::FiatWithdrawParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Fiat REST API client let rest_client = FiatRestApi::production(rest_conf); // Setup the API parameters let params = FiatWithdrawParams::default(); // Make the API call let response = rest_client .fiat_withdraw(params) .await .context("fiat_withdraw request failed")?; info!(?response.rate_limits, "fiat_withdraw rate limits"); let data = response.data().await?; info!(?data, "fiat_withdraw data"); Ok(()) } examples/fiat/rest_api/fiat_api/get_fiat_deposit_withdraw_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::fiat::{FiatRestApi, rest_api::GetFiatDepositWithdrawHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Fiat REST API client let rest_client = FiatRestApi::production(rest_conf); // Setup the API parameters let params = GetFiatDepositWithdrawHistoryParams::builder("transaction_type_example".to_string()) .build()?; // Make the API call let response = rest_client .get_fiat_deposit_withdraw_history(params) .await .context("get_fiat_deposit_withdraw_history request failed")?; info!(?response.rate_limits, "get_fiat_deposit_withdraw_history rate limits"); let data = response.data().await?; info!(?data, "get_fiat_deposit_withdraw_history data"); Ok(()) } examples/fiat/rest_api/fiat_api/get_fiat_payments_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::fiat::{FiatRestApi, rest_api::GetFiatPaymentsHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Fiat REST API client let rest_client = FiatRestApi::production(rest_conf); // Setup the API parameters let params = GetFiatPaymentsHistoryParams::builder("transaction_type_example".to_string()).build()?; // Make the API call let response = rest_client .get_fiat_payments_history(params) .await .context("get_fiat_payments_history request failed")?; info!(?response.rate_limits, "get_fiat_payments_history rate limits"); let data = response.data().await?; info!(?data, "get_fiat_payments_history data"); Ok(()) } examples/fiat/rest_api/fiat_api/get_order_detail.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::fiat::{FiatRestApi, rest_api::GetOrderDetailParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Fiat REST API client let rest_client = FiatRestApi::production(rest_conf); // Setup the API parameters let params = GetOrderDetailParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_order_detail(params) .await .context("get_order_detail request failed")?; info!(?response.rate_limits, "get_order_detail rate limits"); let data = response.data().await?; info!(?data, "get_order_detail data"); Ok(()) } examples/gift_card/rest_api/market_data_api/create_a_dual_token_gift_card.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::gift_card::{GiftCardRestApi, rest_api::CreateADualTokenGiftCardParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the GiftCard REST API client let rest_client = GiftCardRestApi::production(rest_conf); // Setup the API parameters let params = CreateADualTokenGiftCardParams::builder( "base_token_example".to_string(), "face_token_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .create_a_dual_token_gift_card(params) .await .context("create_a_dual_token_gift_card request failed")?; info!(?response.rate_limits, "create_a_dual_token_gift_card rate limits"); let data = response.data().await?; info!(?data, "create_a_dual_token_gift_card data"); Ok(()) } examples/gift_card/rest_api/market_data_api/create_a_single_token_gift_card.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::gift_card::{GiftCardRestApi, rest_api::CreateASingleTokenGiftCardParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the GiftCard REST API client let rest_client = GiftCardRestApi::production(rest_conf); // Setup the API parameters let params = CreateASingleTokenGiftCardParams::builder("token_example".to_string(), dec!(1.0)) .build()?; // Make the API call let response = rest_client .create_a_single_token_gift_card(params) .await .context("create_a_single_token_gift_card request failed")?; info!(?response.rate_limits, "create_a_single_token_gift_card rate limits"); let data = response.data().await?; info!(?data, "create_a_single_token_gift_card data"); Ok(()) } examples/gift_card/rest_api/market_data_api/fetch_rsa_public_key.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::gift_card::{GiftCardRestApi, rest_api::FetchRsaPublicKeyParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the GiftCard REST API client let rest_client = GiftCardRestApi::production(rest_conf); // Setup the API parameters let params = FetchRsaPublicKeyParams::default(); // Make the API call let response = rest_client .fetch_rsa_public_key(params) .await .context("fetch_rsa_public_key request failed")?; info!(?response.rate_limits, "fetch_rsa_public_key rate limits"); let data = response.data().await?; info!(?data, "fetch_rsa_public_key data"); Ok(()) } examples/gift_card/rest_api/market_data_api/fetch_token_limit.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::gift_card::{GiftCardRestApi, rest_api::FetchTokenLimitParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the GiftCard REST API client let rest_client = GiftCardRestApi::production(rest_conf); // Setup the API parameters let params = FetchTokenLimitParams::builder("base_token_example".to_string()).build()?; // Make the API call let response = rest_client .fetch_token_limit(params) .await .context("fetch_token_limit request failed")?; info!(?response.rate_limits, "fetch_token_limit rate limits"); let data = response.data().await?; info!(?data, "fetch_token_limit data"); Ok(()) } examples/gift_card/rest_api/market_data_api/redeem_a_binance_gift_card.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::gift_card::{GiftCardRestApi, rest_api::RedeemABinanceGiftCardParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the GiftCard REST API client let rest_client = GiftCardRestApi::production(rest_conf); // Setup the API parameters let params = RedeemABinanceGiftCardParams::builder("code_example".to_string()).build()?; // Make the API call let response = rest_client .redeem_a_binance_gift_card(params) .await .context("redeem_a_binance_gift_card request failed")?; info!(?response.rate_limits, "redeem_a_binance_gift_card rate limits"); let data = response.data().await?; info!(?data, "redeem_a_binance_gift_card data"); Ok(()) } examples/gift_card/rest_api/market_data_api/verify_binance_gift_card_by_gift_card_number.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::gift_card::{ GiftCardRestApi, rest_api::VerifyBinanceGiftCardByGiftCardNumberParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the GiftCard REST API client let rest_client = GiftCardRestApi::production(rest_conf); // Setup the API parameters let params = VerifyBinanceGiftCardByGiftCardNumberParams::builder("reference_no_example".to_string()) .build()?; // Make the API call let response = rest_client .verify_binance_gift_card_by_gift_card_number(params) .await .context("verify_binance_gift_card_by_gift_card_number request failed")?; info!(?response.rate_limits, "verify_binance_gift_card_by_gift_card_number rate limits"); let data = response.data().await?; info!(?data, "verify_binance_gift_card_by_gift_card_number data"); Ok(()) } examples/margin_trading/rest_api/account_api/adjust_cross_margin_max_leverage.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::AdjustCrossMarginMaxLeverageParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = AdjustCrossMarginMaxLeverageParams::builder(789).build()?; // Make the API call let response = rest_client .adjust_cross_margin_max_leverage(params) .await .context("adjust_cross_margin_max_leverage request failed")?; info!(?response.rate_limits, "adjust_cross_margin_max_leverage rate limits"); let data = response.data().await?; info!(?data, "adjust_cross_margin_max_leverage data"); Ok(()) } examples/margin_trading/rest_api/account_api/disable_isolated_margin_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::DisableIsolatedMarginAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = DisableIsolatedMarginAccountParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .disable_isolated_margin_account(params) .await .context("disable_isolated_margin_account request failed")?; info!(?response.rate_limits, "disable_isolated_margin_account rate limits"); let data = response.data().await?; info!(?data, "disable_isolated_margin_account data"); Ok(()) } examples/margin_trading/rest_api/account_api/enable_isolated_margin_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::EnableIsolatedMarginAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = EnableIsolatedMarginAccountParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .enable_isolated_margin_account(params) .await .context("enable_isolated_margin_account request failed")?; info!(?response.rate_limits, "enable_isolated_margin_account rate limits"); let data = response.data().await?; info!(?data, "enable_isolated_margin_account data"); Ok(()) } examples/margin_trading/rest_api/account_api/get_bnb_burn_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::GetBnbBurnStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetBnbBurnStatusParams::default(); // Make the API call let response = rest_client .get_bnb_burn_status(params) .await .context("get_bnb_burn_status request failed")?; info!(?response.rate_limits, "get_bnb_burn_status rate limits"); let data = response.data().await?; info!(?data, "get_bnb_burn_status data"); Ok(()) } examples/margin_trading/rest_api/account_api/get_summary_of_margin_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::GetSummaryOfMarginAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetSummaryOfMarginAccountParams::default(); // Make the API call let response = rest_client .get_summary_of_margin_account(params) .await .context("get_summary_of_margin_account request failed")?; info!(?response.rate_limits, "get_summary_of_margin_account rate limits"); let data = response.data().await?; info!(?data, "get_summary_of_margin_account data"); Ok(()) } examples/margin_trading/rest_api/account_api/query_cross_isolated_margin_capital_flow.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryCrossIsolatedMarginCapitalFlowParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryCrossIsolatedMarginCapitalFlowParams::default(); // Make the API call let response = rest_client .query_cross_isolated_margin_capital_flow(params) .await .context("query_cross_isolated_margin_capital_flow request failed")?; info!(?response.rate_limits, "query_cross_isolated_margin_capital_flow rate limits"); let data = response.data().await?; info!(?data, "query_cross_isolated_margin_capital_flow data"); Ok(()) } examples/margin_trading/rest_api/account_api/query_cross_margin_account_details.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryCrossMarginAccountDetailsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryCrossMarginAccountDetailsParams::default(); // Make the API call let response = rest_client .query_cross_margin_account_details(params) .await .context("query_cross_margin_account_details request failed")?; info!(?response.rate_limits, "query_cross_margin_account_details rate limits"); let data = response.data().await?; info!(?data, "query_cross_margin_account_details data"); Ok(()) } examples/margin_trading/rest_api/account_api/query_cross_margin_fee_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::QueryCrossMarginFeeDataParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryCrossMarginFeeDataParams::default(); // Make the API call let response = rest_client .query_cross_margin_fee_data(params) .await .context("query_cross_margin_fee_data request failed")?; info!(?response.rate_limits, "query_cross_margin_fee_data rate limits"); let data = response.data().await?; info!(?data, "query_cross_margin_fee_data data"); Ok(()) } examples/margin_trading/rest_api/account_api/query_enabled_isolated_margin_account_limit.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryEnabledIsolatedMarginAccountLimitParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryEnabledIsolatedMarginAccountLimitParams::default(); // Make the API call let response = rest_client .query_enabled_isolated_margin_account_limit(params) .await .context("query_enabled_isolated_margin_account_limit request failed")?; info!(?response.rate_limits, "query_enabled_isolated_margin_account_limit rate limits"); let data = response.data().await?; info!(?data, "query_enabled_isolated_margin_account_limit data"); Ok(()) } examples/margin_trading/rest_api/account_api/query_isolated_margin_account_info.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryIsolatedMarginAccountInfoParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryIsolatedMarginAccountInfoParams::default(); // Make the API call let response = rest_client .query_isolated_margin_account_info(params) .await .context("query_isolated_margin_account_info request failed")?; info!(?response.rate_limits, "query_isolated_margin_account_info rate limits"); let data = response.data().await?; info!(?data, "query_isolated_margin_account_info data"); Ok(()) } examples/margin_trading/rest_api/account_api/query_isolated_margin_fee_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryIsolatedMarginFeeDataParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryIsolatedMarginFeeDataParams::default(); // Make the API call let response = rest_client .query_isolated_margin_fee_data(params) .await .context("query_isolated_margin_fee_data request failed")?; info!(?response.rate_limits, "query_isolated_margin_fee_data rate limits"); let data = response.data().await?; info!(?data, "query_isolated_margin_fee_data data"); Ok(()) } examples/margin_trading/rest_api/borrow_repay_api/get_future_hourly_interest_rate.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::GetFutureHourlyInterestRateParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetFutureHourlyInterestRateParams::builder("assets_example".to_string(), false).build()?; // Make the API call let response = rest_client .get_future_hourly_interest_rate(params) .await .context("get_future_hourly_interest_rate request failed")?; info!(?response.rate_limits, "get_future_hourly_interest_rate rate limits"); let data = response.data().await?; info!(?data, "get_future_hourly_interest_rate data"); Ok(()) } examples/margin_trading/rest_api/borrow_repay_api/get_interest_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::GetInterestHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetInterestHistoryParams::default(); // Make the API call let response = rest_client .get_interest_history(params) .await .context("get_interest_history request failed")?; info!(?response.rate_limits, "get_interest_history rate limits"); let data = response.data().await?; info!(?data, "get_interest_history data"); Ok(()) } examples/margin_trading/rest_api/borrow_repay_api/margin_account_borrow_repay.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::MarginAccountBorrowRepayParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountBorrowRepayParams::builder( "asset_example".to_string(), "FALSE".to_string(), "symbol_example".to_string(), "amount_example".to_string(), "r#type_example".to_string(), ) .build()?; // Make the API call let response = rest_client .margin_account_borrow_repay(params) .await .context("margin_account_borrow_repay request failed")?; info!(?response.rate_limits, "margin_account_borrow_repay rate limits"); let data = response.data().await?; info!(?data, "margin_account_borrow_repay data"); Ok(()) } examples/margin_trading/rest_api/borrow_repay_api/query_borrow_repay_records_in_margin_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryBorrowRepayRecordsInMarginAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryBorrowRepayRecordsInMarginAccountParams::builder("r#type_example".to_string()) .build()?; // Make the API call let response = rest_client .query_borrow_repay_records_in_margin_account(params) .await .context("query_borrow_repay_records_in_margin_account request failed")?; info!(?response.rate_limits, "query_borrow_repay_records_in_margin_account rate limits"); let data = response.data().await?; info!(?data, "query_borrow_repay_records_in_margin_account data"); Ok(()) } examples/margin_trading/rest_api/borrow_repay_api/query_margin_interest_rate_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryMarginInterestRateHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginInterestRateHistoryParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .query_margin_interest_rate_history(params) .await .context("query_margin_interest_rate_history request failed")?; info!(?response.rate_limits, "query_margin_interest_rate_history rate limits"); let data = response.data().await?; info!(?data, "query_margin_interest_rate_history data"); Ok(()) } examples/margin_trading/rest_api/borrow_repay_api/query_max_borrow.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::QueryMaxBorrowParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMaxBorrowParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .query_max_borrow(params) .await .context("query_max_borrow request failed")?; info!(?response.rate_limits, "query_max_borrow rate limits"); let data = response.data().await?; info!(?data, "query_max_borrow data"); Ok(()) } examples/margin_trading/rest_api/market_data_api/cross_margin_collateral_ratio.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::MarginTradingRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Make the API call let response = rest_client .cross_margin_collateral_ratio() .await .context("cross_margin_collateral_ratio request failed")?; info!(?response.rate_limits, "cross_margin_collateral_ratio rate limits"); let data = response.data().await?; info!(?data, "cross_margin_collateral_ratio data"); Ok(()) } examples/margin_trading/rest_api/market_data_api/get_all_cross_margin_pairs.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::GetAllCrossMarginPairsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetAllCrossMarginPairsParams::default(); // Make the API call let response = rest_client .get_all_cross_margin_pairs(params) .await .context("get_all_cross_margin_pairs request failed")?; info!(?response.rate_limits, "get_all_cross_margin_pairs rate limits"); let data = response.data().await?; info!(?data, "get_all_cross_margin_pairs data"); Ok(()) } examples/margin_trading/rest_api/market_data_api/get_all_isolated_margin_symbol.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::GetAllIsolatedMarginSymbolParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetAllIsolatedMarginSymbolParams::default(); // Make the API call let response = rest_client .get_all_isolated_margin_symbol(params) .await .context("get_all_isolated_margin_symbol request failed")?; info!(?response.rate_limits, "get_all_isolated_margin_symbol rate limits"); let data = response.data().await?; info!(?data, "get_all_isolated_margin_symbol data"); Ok(()) } examples/margin_trading/rest_api/market_data_api/get_all_margin_assets.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::GetAllMarginAssetsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetAllMarginAssetsParams::default(); // Make the API call let response = rest_client .get_all_margin_assets(params) .await .context("get_all_margin_assets request failed")?; info!(?response.rate_limits, "get_all_margin_assets rate limits"); let data = response.data().await?; info!(?data, "get_all_margin_assets data"); Ok(()) } examples/margin_trading/rest_api/market_data_api/get_delist_schedule.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::GetDelistScheduleParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetDelistScheduleParams::default(); // Make the API call let response = rest_client .get_delist_schedule(params) .await .context("get_delist_schedule request failed")?; info!(?response.rate_limits, "get_delist_schedule rate limits"); let data = response.data().await?; info!(?data, "get_delist_schedule data"); Ok(()) } examples/margin_trading/rest_api/market_data_api/get_limit_price_pairs.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::MarginTradingRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Make the API call let response = rest_client .get_limit_price_pairs() .await .context("get_limit_price_pairs request failed")?; info!(?response.rate_limits, "get_limit_price_pairs rate limits"); let data = response.data().await?; info!(?data, "get_limit_price_pairs data"); Ok(()) } examples/margin_trading/rest_api/market_data_api/get_list_schedule.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::GetListScheduleParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetListScheduleParams::default(); // Make the API call let response = rest_client .get_list_schedule(params) .await .context("get_list_schedule request failed")?; info!(?response.rate_limits, "get_list_schedule rate limits"); let data = response.data().await?; info!(?data, "get_list_schedule data"); Ok(()) } examples/margin_trading/rest_api/market_data_api/query_isolated_margin_tier_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryIsolatedMarginTierDataParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryIsolatedMarginTierDataParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_isolated_margin_tier_data(params) .await .context("query_isolated_margin_tier_data request failed")?; info!(?response.rate_limits, "query_isolated_margin_tier_data rate limits"); let data = response.data().await?; info!(?data, "query_isolated_margin_tier_data data"); Ok(()) } examples/margin_trading/rest_api/market_data_api/query_liability_coin_leverage_bracket_in_cross_margin_pro_mode.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::MarginTradingRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Make the API call let response = rest_client .query_liability_coin_leverage_bracket_in_cross_margin_pro_mode() .await .context("query_liability_coin_leverage_bracket_in_cross_margin_pro_mode request failed")?; info!(?response.rate_limits, "query_liability_coin_leverage_bracket_in_cross_margin_pro_mode rate limits"); let data = response.data().await?; info!( ?data, "query_liability_coin_leverage_bracket_in_cross_margin_pro_mode data" ); Ok(()) } examples/margin_trading/rest_api/market_data_api/query_margin_available_inventory.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryMarginAvailableInventoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAvailableInventoryParams::builder("r#type_example".to_string()).build()?; // Make the API call let response = rest_client .query_margin_available_inventory(params) .await .context("query_margin_available_inventory request failed")?; info!(?response.rate_limits, "query_margin_available_inventory rate limits"); let data = response.data().await?; info!(?data, "query_margin_available_inventory data"); Ok(()) } examples/margin_trading/rest_api/market_data_api/query_margin_priceindex.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::QueryMarginPriceindexParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginPriceindexParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_margin_priceindex(params) .await .context("query_margin_priceindex request failed")?; info!(?response.rate_limits, "query_margin_priceindex rate limits"); let data = response.data().await?; info!(?data, "query_margin_priceindex data"); Ok(()) } examples/margin_trading/rest_api/risk_data_stream_api/close_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::MarginTradingRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Make the API call let response = rest_client .close_user_data_stream() .await .context("close_user_data_stream request failed")?; info!(?response.rate_limits, "close_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "close_user_data_stream data"); Ok(()) } examples/margin_trading/rest_api/risk_data_stream_api/keepalive_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::KeepaliveUserDataStreamParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = KeepaliveUserDataStreamParams::builder("listen_key_example".to_string()).build()?; // Make the API call let response = rest_client .keepalive_user_data_stream(params) .await .context("keepalive_user_data_stream request failed")?; info!(?response.rate_limits, "keepalive_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "keepalive_user_data_stream data"); Ok(()) } examples/margin_trading/rest_api/risk_data_stream_api/start_user_data_stream.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::MarginTradingRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Make the API call let response = rest_client .start_user_data_stream() .await .context("start_user_data_stream request failed")?; info!(?response.rate_limits, "start_user_data_stream rate limits"); let data = response.data().await?; info!(?data, "start_user_data_stream data"); Ok(()) } examples/margin_trading/rest_api/trade_api/create_special_key.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::CreateSpecialKeyParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = CreateSpecialKeyParams::builder("api_name_example".to_string()).build()?; // Make the API call let response = rest_client .create_special_key(params) .await .context("create_special_key request failed")?; info!(?response.rate_limits, "create_special_key rate limits"); let data = response.data().await?; info!(?data, "create_special_key data"); Ok(()) } examples/margin_trading/rest_api/trade_api/delete_special_key.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::DeleteSpecialKeyParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = DeleteSpecialKeyParams::default(); // Make the API call let response = rest_client .delete_special_key(params) .await .context("delete_special_key request failed")?; info!(?response.rate_limits, "delete_special_key rate limits"); let data = response.data().await?; info!(?data, "delete_special_key data"); Ok(()) } examples/margin_trading/rest_api/trade_api/edit_ip_for_special_key.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::EditIpForSpecialKeyParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = EditIpForSpecialKeyParams::builder("ip_example".to_string()).build()?; // Make the API call let response = rest_client .edit_ip_for_special_key(params) .await .context("edit_ip_for_special_key request failed")?; info!(?response.rate_limits, "edit_ip_for_special_key rate limits"); let data = response.data().await?; info!(?data, "edit_ip_for_special_key data"); Ok(()) } examples/margin_trading/rest_api/trade_api/get_force_liquidation_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::GetForceLiquidationRecordParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetForceLiquidationRecordParams::default(); // Make the API call let response = rest_client .get_force_liquidation_record(params) .await .context("get_force_liquidation_record request failed")?; info!(?response.rate_limits, "get_force_liquidation_record rate limits"); let data = response.data().await?; info!(?data, "get_force_liquidation_record data"); Ok(()) } examples/margin_trading/rest_api/trade_api/get_small_liability_exchange_coin_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::GetSmallLiabilityExchangeCoinListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetSmallLiabilityExchangeCoinListParams::default(); // Make the API call let response = rest_client .get_small_liability_exchange_coin_list(params) .await .context("get_small_liability_exchange_coin_list request failed")?; info!(?response.rate_limits, "get_small_liability_exchange_coin_list rate limits"); let data = response.data().await?; info!(?data, "get_small_liability_exchange_coin_list data"); Ok(()) } examples/margin_trading/rest_api/trade_api/get_small_liability_exchange_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::GetSmallLiabilityExchangeHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetSmallLiabilityExchangeHistoryParams::builder(1, 10).build()?; // Make the API call let response = rest_client .get_small_liability_exchange_history(params) .await .context("get_small_liability_exchange_history request failed")?; info!(?response.rate_limits, "get_small_liability_exchange_history rate limits"); let data = response.data().await?; info!(?data, "get_small_liability_exchange_history data"); Ok(()) } examples/margin_trading/rest_api/trade_api/margin_account_cancel_all_open_orders_on_a_symbol.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::MarginAccountCancelAllOpenOrdersOnASymbolParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountCancelAllOpenOrdersOnASymbolParams::builder("symbol_example".to_string()) .build()?; // Make the API call let response = rest_client .margin_account_cancel_all_open_orders_on_a_symbol(params) .await .context("margin_account_cancel_all_open_orders_on_a_symbol request failed")?; info!(?response.rate_limits, "margin_account_cancel_all_open_orders_on_a_symbol rate limits"); let data = response.data().await?; info!( ?data, "margin_account_cancel_all_open_orders_on_a_symbol data" ); Ok(()) } examples/margin_trading/rest_api/trade_api/margin_account_cancel_oco.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::MarginAccountCancelOcoParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountCancelOcoParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .margin_account_cancel_oco(params) .await .context("margin_account_cancel_oco request failed")?; info!(?response.rate_limits, "margin_account_cancel_oco rate limits"); let data = response.data().await?; info!(?data, "margin_account_cancel_oco data"); Ok(()) } examples/margin_trading/rest_api/trade_api/margin_account_cancel_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::MarginAccountCancelOrderParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountCancelOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .margin_account_cancel_order(params) .await .context("margin_account_cancel_order request failed")?; info!(?response.rate_limits, "margin_account_cancel_order rate limits"); let data = response.data().await?; info!(?data, "margin_account_cancel_order data"); Ok(()) } examples/margin_trading/rest_api/trade_api/margin_account_new_oco.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::{MarginAccountNewOcoParams, MarginAccountNewOcoSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountNewOcoParams::builder( "symbol_example".to_string(), MarginAccountNewOcoSideEnum::Buy, dec!(1.0), dec!(1.0), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .margin_account_new_oco(params) .await .context("margin_account_new_oco request failed")?; info!(?response.rate_limits, "margin_account_new_oco rate limits"); let data = response.data().await?; info!(?data, "margin_account_new_oco data"); Ok(()) } examples/margin_trading/rest_api/trade_api/margin_account_new_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::{MarginAccountNewOrderParams, MarginAccountNewOrderSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountNewOrderParams::builder( "symbol_example".to_string(), MarginAccountNewOrderSideEnum::Buy, "r#type_example".to_string(), ) .build()?; // Make the API call let response = rest_client .margin_account_new_order(params) .await .context("margin_account_new_order request failed")?; info!(?response.rate_limits, "margin_account_new_order rate limits"); let data = response.data().await?; info!(?data, "margin_account_new_order data"); Ok(()) } examples/margin_trading/rest_api/trade_api/margin_account_new_oto.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::MarginAccountNewOtoParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountNewOtoParams::builder( "symbol_example".to_string(), "working_type_example".to_string(), "working_side_example".to_string(), dec!(1.0), dec!(1.0), dec!(1.0), "Order Types".to_string(), "pending_side_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .margin_account_new_oto(params) .await .context("margin_account_new_oto request failed")?; info!(?response.rate_limits, "margin_account_new_oto rate limits"); let data = response.data().await?; info!(?data, "margin_account_new_oto data"); Ok(()) } examples/margin_trading/rest_api/trade_api/margin_account_new_otoco.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::MarginAccountNewOtocoParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = MarginAccountNewOtocoParams::builder( "symbol_example".to_string(), "working_type_example".to_string(), "working_side_example".to_string(), dec!(1.0), dec!(1.0), "pending_side_example".to_string(), dec!(1.0), "pending_above_type_example".to_string(), ) .build()?; // Make the API call let response = rest_client .margin_account_new_otoco(params) .await .context("margin_account_new_otoco request failed")?; info!(?response.rate_limits, "margin_account_new_otoco rate limits"); let data = response.data().await?; info!(?data, "margin_account_new_otoco data"); Ok(()) } examples/margin_trading/rest_api/trade_api/margin_manual_liquidation.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::MarginManualLiquidationParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = MarginManualLiquidationParams::builder("r#type_example".to_string()).build()?; // Make the API call let response = rest_client .margin_manual_liquidation(params) .await .context("margin_manual_liquidation request failed")?; info!(?response.rate_limits, "margin_manual_liquidation rate limits"); let data = response.data().await?; info!(?data, "margin_manual_liquidation data"); Ok(()) } examples/margin_trading/rest_api/trade_api/query_current_margin_order_count_usage.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryCurrentMarginOrderCountUsageParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryCurrentMarginOrderCountUsageParams::default(); // Make the API call let response = rest_client .query_current_margin_order_count_usage(params) .await .context("query_current_margin_order_count_usage request failed")?; info!(?response.rate_limits, "query_current_margin_order_count_usage rate limits"); let data = response.data().await?; info!(?data, "query_current_margin_order_count_usage data"); Ok(()) } examples/margin_trading/rest_api/trade_api/query_margin_accounts_all_oco.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryMarginAccountsAllOcoParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountsAllOcoParams::default(); // Make the API call let response = rest_client .query_margin_accounts_all_oco(params) .await .context("query_margin_accounts_all_oco request failed")?; info!(?response.rate_limits, "query_margin_accounts_all_oco rate limits"); let data = response.data().await?; info!(?data, "query_margin_accounts_all_oco data"); Ok(()) } examples/margin_trading/rest_api/trade_api/query_margin_accounts_all_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryMarginAccountsAllOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountsAllOrdersParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_margin_accounts_all_orders(params) .await .context("query_margin_accounts_all_orders request failed")?; info!(?response.rate_limits, "query_margin_accounts_all_orders rate limits"); let data = response.data().await?; info!(?data, "query_margin_accounts_all_orders data"); Ok(()) } examples/margin_trading/rest_api/trade_api/query_margin_accounts_oco.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::QueryMarginAccountsOcoParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountsOcoParams::default(); // Make the API call let response = rest_client .query_margin_accounts_oco(params) .await .context("query_margin_accounts_oco request failed")?; info!(?response.rate_limits, "query_margin_accounts_oco rate limits"); let data = response.data().await?; info!(?data, "query_margin_accounts_oco data"); Ok(()) } examples/margin_trading/rest_api/trade_api/query_margin_accounts_open_oco.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryMarginAccountsOpenOcoParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountsOpenOcoParams::default(); // Make the API call let response = rest_client .query_margin_accounts_open_oco(params) .await .context("query_margin_accounts_open_oco request failed")?; info!(?response.rate_limits, "query_margin_accounts_open_oco rate limits"); let data = response.data().await?; info!(?data, "query_margin_accounts_open_oco data"); Ok(()) } examples/margin_trading/rest_api/trade_api/query_margin_accounts_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryMarginAccountsOpenOrdersParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountsOpenOrdersParams::default(); // Make the API call let response = rest_client .query_margin_accounts_open_orders(params) .await .context("query_margin_accounts_open_orders request failed")?; info!(?response.rate_limits, "query_margin_accounts_open_orders rate limits"); let data = response.data().await?; info!(?data, "query_margin_accounts_open_orders data"); Ok(()) } examples/margin_trading/rest_api/trade_api/query_margin_accounts_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::QueryMarginAccountsOrderParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountsOrderParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_margin_accounts_order(params) .await .context("query_margin_accounts_order request failed")?; info!(?response.rate_limits, "query_margin_accounts_order rate limits"); let data = response.data().await?; info!(?data, "query_margin_accounts_order data"); Ok(()) } examples/margin_trading/rest_api/trade_api/query_margin_accounts_trade_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryMarginAccountsTradeListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMarginAccountsTradeListParams::builder("symbol_example".to_string()).build()?; // Make the API call let response = rest_client .query_margin_accounts_trade_list(params) .await .context("query_margin_accounts_trade_list request failed")?; info!(?response.rate_limits, "query_margin_accounts_trade_list rate limits"); let data = response.data().await?; info!(?data, "query_margin_accounts_trade_list data"); Ok(()) } examples/margin_trading/rest_api/trade_api/query_special_key.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::QuerySpecialKeyParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QuerySpecialKeyParams::default(); // Make the API call let response = rest_client .query_special_key(params) .await .context("query_special_key request failed")?; info!(?response.rate_limits, "query_special_key rate limits"); let data = response.data().await?; info!(?data, "query_special_key data"); Ok(()) } examples/margin_trading/rest_api/trade_api/query_special_key_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::QuerySpecialKeyListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QuerySpecialKeyListParams::default(); // Make the API call let response = rest_client .query_special_key_list(params) .await .context("query_special_key_list request failed")?; info!(?response.rate_limits, "query_special_key_list rate limits"); let data = response.data().await?; info!(?data, "query_special_key_list data"); Ok(()) } examples/margin_trading/rest_api/trade_api/small_liability_exchange.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{MarginTradingRestApi, rest_api::SmallLiabilityExchangeParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = SmallLiabilityExchangeParams::builder(["BTC".to_string()].to_vec()).build()?; // Make the API call let response = rest_client .small_liability_exchange(params) .await .context("small_liability_exchange request failed")?; info!(?response.rate_limits, "small_liability_exchange rate limits"); let data = response.data().await?; info!(?data, "small_liability_exchange data"); Ok(()) } examples/margin_trading/rest_api/transfer_api/get_cross_margin_transfer_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::GetCrossMarginTransferHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = GetCrossMarginTransferHistoryParams::default(); // Make the API call let response = rest_client .get_cross_margin_transfer_history(params) .await .context("get_cross_margin_transfer_history request failed")?; info!(?response.rate_limits, "get_cross_margin_transfer_history rate limits"); let data = response.data().await?; info!(?data, "get_cross_margin_transfer_history data"); Ok(()) } examples/margin_trading/rest_api/transfer_api/query_max_transfer_out_amount.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::margin_trading::{ MarginTradingRestApi, rest_api::QueryMaxTransferOutAmountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the MarginTrading REST API client let rest_client = MarginTradingRestApi::production(rest_conf); // Setup the API parameters let params = QueryMaxTransferOutAmountParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .query_max_transfer_out_amount(params) .await .context("query_max_transfer_out_amount request failed")?; info!(?response.rate_limits, "query_max_transfer_out_amount rate limits"); let data = response.data().await?; info!(?data, "query_max_transfer_out_amount data"); Ok(()) } examples/mining/rest_api/mining_api/account_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::AccountListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = AccountListParams::builder("algo_example".to_string(), "user_name_example".to_string()) .build()?; // Make the API call let response = rest_client .account_list(params) .await .context("account_list request failed")?; info!(?response.rate_limits, "account_list rate limits"); let data = response.data().await?; info!(?data, "account_list data"); Ok(()) } examples/mining/rest_api/mining_api/acquiring_algorithm.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::MiningRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Make the API call let response = rest_client .acquiring_algorithm() .await .context("acquiring_algorithm request failed")?; info!(?response.rate_limits, "acquiring_algorithm rate limits"); let data = response.data().await?; info!(?data, "acquiring_algorithm data"); Ok(()) } examples/mining/rest_api/mining_api/acquiring_coinname.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::MiningRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Make the API call let response = rest_client .acquiring_coinname() .await .context("acquiring_coinname request failed")?; info!(?response.rate_limits, "acquiring_coinname rate limits"); let data = response.data().await?; info!(?data, "acquiring_coinname data"); Ok(()) } examples/mining/rest_api/mining_api/cancel_hashrate_resale_configuration.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::CancelHashrateResaleConfigurationParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = CancelHashrateResaleConfigurationParams::builder(1, "user_name_example".to_string()) .build()?; // Make the API call let response = rest_client .cancel_hashrate_resale_configuration(params) .await .context("cancel_hashrate_resale_configuration request failed")?; info!(?response.rate_limits, "cancel_hashrate_resale_configuration rate limits"); let data = response.data().await?; info!(?data, "cancel_hashrate_resale_configuration data"); Ok(()) } examples/mining/rest_api/mining_api/earnings_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::EarningsListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = EarningsListParams::builder("algo_example".to_string(), "user_name_example".to_string()) .build()?; // Make the API call let response = rest_client .earnings_list(params) .await .context("earnings_list request failed")?; info!(?response.rate_limits, "earnings_list rate limits"); let data = response.data().await?; info!(?data, "earnings_list data"); Ok(()) } examples/mining/rest_api/mining_api/extra_bonus_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::ExtraBonusListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = ExtraBonusListParams::builder("algo_example".to_string(), "user_name_example".to_string()) .build()?; // Make the API call let response = rest_client .extra_bonus_list(params) .await .context("extra_bonus_list request failed")?; info!(?response.rate_limits, "extra_bonus_list rate limits"); let data = response.data().await?; info!(?data, "extra_bonus_list data"); Ok(()) } examples/mining/rest_api/mining_api/hashrate_resale_detail.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::HashrateResaleDetailParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = HashrateResaleDetailParams::builder(1, "user_name_example".to_string()).build()?; // Make the API call let response = rest_client .hashrate_resale_detail(params) .await .context("hashrate_resale_detail request failed")?; info!(?response.rate_limits, "hashrate_resale_detail rate limits"); let data = response.data().await?; info!(?data, "hashrate_resale_detail data"); Ok(()) } examples/mining/rest_api/mining_api/hashrate_resale_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::HashrateResaleListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = HashrateResaleListParams::default(); // Make the API call let response = rest_client .hashrate_resale_list(params) .await .context("hashrate_resale_list request failed")?; info!(?response.rate_limits, "hashrate_resale_list rate limits"); let data = response.data().await?; info!(?data, "hashrate_resale_list data"); Ok(()) } examples/mining/rest_api/mining_api/hashrate_resale_request.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::HashrateResaleRequestParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = HashrateResaleRequestParams::builder( "user_name_example".to_string(), "algo_example".to_string(), 789, 789, "to_pool_user_example".to_string(), 789, ) .build()?; // Make the API call let response = rest_client .hashrate_resale_request(params) .await .context("hashrate_resale_request request failed")?; info!(?response.rate_limits, "hashrate_resale_request rate limits"); let data = response.data().await?; info!(?data, "hashrate_resale_request data"); Ok(()) } examples/mining/rest_api/mining_api/mining_account_earning.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::MiningAccountEarningParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = MiningAccountEarningParams::builder("algo_example".to_string()).build()?; // Make the API call let response = rest_client .mining_account_earning(params) .await .context("mining_account_earning request failed")?; info!(?response.rate_limits, "mining_account_earning rate limits"); let data = response.data().await?; info!(?data, "mining_account_earning data"); Ok(()) } examples/mining/rest_api/mining_api/request_for_detail_miner_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::RequestForDetailMinerListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = RequestForDetailMinerListParams::builder( "algo_example".to_string(), "user_name_example".to_string(), "worker_name_example".to_string(), ) .build()?; // Make the API call let response = rest_client .request_for_detail_miner_list(params) .await .context("request_for_detail_miner_list request failed")?; info!(?response.rate_limits, "request_for_detail_miner_list rate limits"); let data = response.data().await?; info!(?data, "request_for_detail_miner_list data"); Ok(()) } examples/mining/rest_api/mining_api/request_for_miner_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::RequestForMinerListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = RequestForMinerListParams::builder( "algo_example".to_string(), "user_name_example".to_string(), ) .build()?; // Make the API call let response = rest_client .request_for_miner_list(params) .await .context("request_for_miner_list request failed")?; info!(?response.rate_limits, "request_for_miner_list rate limits"); let data = response.data().await?; info!(?data, "request_for_miner_list data"); Ok(()) } examples/mining/rest_api/mining_api/statistic_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::mining::{MiningRestApi, rest_api::StatisticListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Mining REST API client let rest_client = MiningRestApi::production(rest_conf); // Setup the API parameters let params = StatisticListParams::builder("algo_example".to_string(), "user_name_example".to_string()) .build()?; // Make the API call let response = rest_client .statistic_list(params) .await .context("statistic_list request failed")?; info!(?response.rate_limits, "statistic_list rate limits"); let data = response.data().await?; info!(?data, "statistic_list data"); Ok(()) } examples/nft/rest_api/nft_api/get_nft_asset.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::nft::{NFTRestApi, rest_api::GetNftAssetParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the NFT REST API client let rest_client = NFTRestApi::production(rest_conf); // Setup the API parameters let params = GetNftAssetParams::default(); // Make the API call let response = rest_client .get_nft_asset(params) .await .context("get_nft_asset request failed")?; info!(?response.rate_limits, "get_nft_asset rate limits"); let data = response.data().await?; info!(?data, "get_nft_asset data"); Ok(()) } examples/nft/rest_api/nft_api/get_nft_deposit_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::nft::{NFTRestApi, rest_api::GetNftDepositHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the NFT REST API client let rest_client = NFTRestApi::production(rest_conf); // Setup the API parameters let params = GetNftDepositHistoryParams::default(); // Make the API call let response = rest_client .get_nft_deposit_history(params) .await .context("get_nft_deposit_history request failed")?; info!(?response.rate_limits, "get_nft_deposit_history rate limits"); let data = response.data().await?; info!(?data, "get_nft_deposit_history data"); Ok(()) } examples/nft/rest_api/nft_api/get_nft_transaction_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::nft::{NFTRestApi, rest_api::GetNftTransactionHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the NFT REST API client let rest_client = NFTRestApi::production(rest_conf); // Setup the API parameters let params = GetNftTransactionHistoryParams::builder(789).build()?; // Make the API call let response = rest_client .get_nft_transaction_history(params) .await .context("get_nft_transaction_history request failed")?; info!(?response.rate_limits, "get_nft_transaction_history rate limits"); let data = response.data().await?; info!(?data, "get_nft_transaction_history data"); Ok(()) } examples/nft/rest_api/nft_api/get_nft_withdraw_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::nft::{NFTRestApi, rest_api::GetNftWithdrawHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the NFT REST API client let rest_client = NFTRestApi::production(rest_conf); // Setup the API parameters let params = GetNftWithdrawHistoryParams::default(); // Make the API call let response = rest_client .get_nft_withdraw_history(params) .await .context("get_nft_withdraw_history request failed")?; info!(?response.rate_limits, "get_nft_withdraw_history rate limits"); let data = response.data().await?; info!(?data, "get_nft_withdraw_history data"); Ok(()) } examples/pay/rest_api/pay_api/get_pay_trade_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::pay::{PayRestApi, rest_api::GetPayTradeHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Pay REST API client let rest_client = PayRestApi::production(rest_conf); // Setup the API parameters let params = GetPayTradeHistoryParams::default(); // Make the API call let response = rest_client .get_pay_trade_history(params) .await .context("get_pay_trade_history request failed")?; info!(?response.rate_limits, "get_pay_trade_history rate limits"); let data = response.data().await?; info!(?data, "get_pay_trade_history data"); Ok(()) } examples/rebate/rest_api/rebate_api/get_spot_rebate_history_records.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::rebate::{RebateRestApi, rest_api::GetSpotRebateHistoryRecordsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Rebate REST API client let rest_client = RebateRestApi::production(rest_conf); // Setup the API parameters let params = GetSpotRebateHistoryRecordsParams::default(); // Make the API call let response = rest_client .get_spot_rebate_history_records(params) .await .context("get_spot_rebate_history_records request failed")?; info!(?response.rate_limits, "get_spot_rebate_history_records rate limits"); let data = response.data().await?; info!(?data, "get_spot_rebate_history_records data"); Ok(()) } examples/simple_earn/rest_api/bfusd_api/get_bfusd_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetBfusdAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetBfusdAccountParams::default(); // Make the API call let response = rest_client .get_bfusd_account(params) .await .context("get_bfusd_account request failed")?; info!(?response.rate_limits, "get_bfusd_account rate limits"); let data = response.data().await?; info!(?data, "get_bfusd_account data"); Ok(()) } examples/simple_earn/rest_api/bfusd_api/get_bfusd_quota_details.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetBfusdQuotaDetailsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetBfusdQuotaDetailsParams::default(); // Make the API call let response = rest_client .get_bfusd_quota_details(params) .await .context("get_bfusd_quota_details request failed")?; info!(?response.rate_limits, "get_bfusd_quota_details rate limits"); let data = response.data().await?; info!(?data, "get_bfusd_quota_details data"); Ok(()) } examples/simple_earn/rest_api/bfusd_api/get_bfusd_rate_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetBfusdRateHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetBfusdRateHistoryParams::default(); // Make the API call let response = rest_client .get_bfusd_rate_history(params) .await .context("get_bfusd_rate_history request failed")?; info!(?response.rate_limits, "get_bfusd_rate_history rate limits"); let data = response.data().await?; info!(?data, "get_bfusd_rate_history data"); Ok(()) } examples/simple_earn/rest_api/bfusd_api/get_bfusd_redemption_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetBfusdRedemptionHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetBfusdRedemptionHistoryParams::default(); // Make the API call let response = rest_client .get_bfusd_redemption_history(params) .await .context("get_bfusd_redemption_history request failed")?; info!(?response.rate_limits, "get_bfusd_redemption_history rate limits"); let data = response.data().await?; info!(?data, "get_bfusd_redemption_history data"); Ok(()) } examples/simple_earn/rest_api/bfusd_api/get_bfusd_rewards_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetBfusdRewardsHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetBfusdRewardsHistoryParams::default(); // Make the API call let response = rest_client .get_bfusd_rewards_history(params) .await .context("get_bfusd_rewards_history request failed")?; info!(?response.rate_limits, "get_bfusd_rewards_history rate limits"); let data = response.data().await?; info!(?data, "get_bfusd_rewards_history data"); Ok(()) } examples/simple_earn/rest_api/bfusd_api/get_bfusd_subscription_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetBfusdSubscriptionHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetBfusdSubscriptionHistoryParams::default(); // Make the API call let response = rest_client .get_bfusd_subscription_history(params) .await .context("get_bfusd_subscription_history request failed")?; info!(?response.rate_limits, "get_bfusd_subscription_history rate limits"); let data = response.data().await?; info!(?data, "get_bfusd_subscription_history data"); Ok(()) } examples/simple_earn/rest_api/bfusd_api/redeem_bfusd.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::RedeemBfusdParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = RedeemBfusdParams::builder(dec!(1.0), "s".to_string()).build()?; // Make the API call let response = rest_client .redeem_bfusd(params) .await .context("redeem_bfusd request failed")?; info!(?response.rate_limits, "redeem_bfusd rate limits"); let data = response.data().await?; info!(?data, "redeem_bfusd data"); Ok(()) } examples/simple_earn/rest_api/bfusd_api/subscribe_bfusd.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::SubscribeBfusdParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = SubscribeBfusdParams::builder("asset_example".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .subscribe_bfusd(params) .await .context("subscribe_bfusd request failed")?; info!(?response.rate_limits, "subscribe_bfusd rate limits"); let data = response.data().await?; info!(?data, "subscribe_bfusd data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_collateral_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetCollateralRecordParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetCollateralRecordParams::default(); // Make the API call let response = rest_client .get_collateral_record(params) .await .context("get_collateral_record request failed")?; info!(?response.rate_limits, "get_collateral_record rate limits"); let data = response.data().await?; info!(?data, "get_collateral_record data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_flexible_personal_left_quota.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetFlexiblePersonalLeftQuotaParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexiblePersonalLeftQuotaParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_flexible_personal_left_quota(params) .await .context("get_flexible_personal_left_quota request failed")?; info!(?response.rate_limits, "get_flexible_personal_left_quota rate limits"); let data = response.data().await?; info!(?data, "get_flexible_personal_left_quota data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_flexible_product_position.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetFlexibleProductPositionParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleProductPositionParams::default(); // Make the API call let response = rest_client .get_flexible_product_position(params) .await .context("get_flexible_product_position request failed")?; info!(?response.rate_limits, "get_flexible_product_position rate limits"); let data = response.data().await?; info!(?data, "get_flexible_product_position data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_flexible_redemption_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetFlexibleRedemptionRecordParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleRedemptionRecordParams::default(); // Make the API call let response = rest_client .get_flexible_redemption_record(params) .await .context("get_flexible_redemption_record request failed")?; info!(?response.rate_limits, "get_flexible_redemption_record rate limits"); let data = response.data().await?; info!(?data, "get_flexible_redemption_record data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_flexible_rewards_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetFlexibleRewardsHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleRewardsHistoryParams::builder("s".to_string()).build()?; // Make the API call let response = rest_client .get_flexible_rewards_history(params) .await .context("get_flexible_rewards_history request failed")?; info!(?response.rate_limits, "get_flexible_rewards_history rate limits"); let data = response.data().await?; info!(?data, "get_flexible_rewards_history data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_flexible_subscription_preview.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetFlexibleSubscriptionPreviewParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleSubscriptionPreviewParams::builder("1".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .get_flexible_subscription_preview(params) .await .context("get_flexible_subscription_preview request failed")?; info!(?response.rate_limits, "get_flexible_subscription_preview rate limits"); let data = response.data().await?; info!(?data, "get_flexible_subscription_preview data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_flexible_subscription_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetFlexibleSubscriptionRecordParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetFlexibleSubscriptionRecordParams::default(); // Make the API call let response = rest_client .get_flexible_subscription_record(params) .await .context("get_flexible_subscription_record request failed")?; info!(?response.rate_limits, "get_flexible_subscription_record rate limits"); let data = response.data().await?; info!(?data, "get_flexible_subscription_record data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_locked_personal_left_quota.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetLockedPersonalLeftQuotaParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetLockedPersonalLeftQuotaParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_locked_personal_left_quota(params) .await .context("get_locked_personal_left_quota request failed")?; info!(?response.rate_limits, "get_locked_personal_left_quota rate limits"); let data = response.data().await?; info!(?data, "get_locked_personal_left_quota data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_locked_product_position.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetLockedProductPositionParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetLockedProductPositionParams::default(); // Make the API call let response = rest_client .get_locked_product_position(params) .await .context("get_locked_product_position request failed")?; info!(?response.rate_limits, "get_locked_product_position rate limits"); let data = response.data().await?; info!(?data, "get_locked_product_position data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_locked_redemption_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetLockedRedemptionRecordParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetLockedRedemptionRecordParams::default(); // Make the API call let response = rest_client .get_locked_redemption_record(params) .await .context("get_locked_redemption_record request failed")?; info!(?response.rate_limits, "get_locked_redemption_record rate limits"); let data = response.data().await?; info!(?data, "get_locked_redemption_record data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_locked_rewards_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetLockedRewardsHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetLockedRewardsHistoryParams::default(); // Make the API call let response = rest_client .get_locked_rewards_history(params) .await .context("get_locked_rewards_history request failed")?; info!(?response.rate_limits, "get_locked_rewards_history rate limits"); let data = response.data().await?; info!(?data, "get_locked_rewards_history data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_locked_subscription_preview.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetLockedSubscriptionPreviewParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetLockedSubscriptionPreviewParams::builder("1".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .get_locked_subscription_preview(params) .await .context("get_locked_subscription_preview request failed")?; info!(?response.rate_limits, "get_locked_subscription_preview rate limits"); let data = response.data().await?; info!(?data, "get_locked_subscription_preview data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_locked_subscription_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetLockedSubscriptionRecordParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetLockedSubscriptionRecordParams::default(); // Make the API call let response = rest_client .get_locked_subscription_record(params) .await .context("get_locked_subscription_record request failed")?; info!(?response.rate_limits, "get_locked_subscription_record rate limits"); let data = response.data().await?; info!(?data, "get_locked_subscription_record data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_rate_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetRateHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetRateHistoryParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_rate_history(params) .await .context("get_rate_history request failed")?; info!(?response.rate_limits, "get_rate_history rate limits"); let data = response.data().await?; info!(?data, "get_rate_history data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_simple_earn_flexible_product_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{ SimpleEarnRestApi, rest_api::GetSimpleEarnFlexibleProductListParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetSimpleEarnFlexibleProductListParams::default(); // Make the API call let response = rest_client .get_simple_earn_flexible_product_list(params) .await .context("get_simple_earn_flexible_product_list request failed")?; info!(?response.rate_limits, "get_simple_earn_flexible_product_list rate limits"); let data = response.data().await?; info!(?data, "get_simple_earn_flexible_product_list data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/get_simple_earn_locked_product_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetSimpleEarnLockedProductListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetSimpleEarnLockedProductListParams::default(); // Make the API call let response = rest_client .get_simple_earn_locked_product_list(params) .await .context("get_simple_earn_locked_product_list request failed")?; info!(?response.rate_limits, "get_simple_earn_locked_product_list rate limits"); let data = response.data().await?; info!(?data, "get_simple_earn_locked_product_list data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/redeem_flexible_product.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::RedeemFlexibleProductParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = RedeemFlexibleProductParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .redeem_flexible_product(params) .await .context("redeem_flexible_product request failed")?; info!(?response.rate_limits, "redeem_flexible_product rate limits"); let data = response.data().await?; info!(?data, "redeem_flexible_product data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/redeem_locked_product.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::RedeemLockedProductParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = RedeemLockedProductParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .redeem_locked_product(params) .await .context("redeem_locked_product request failed")?; info!(?response.rate_limits, "redeem_locked_product rate limits"); let data = response.data().await?; info!(?data, "redeem_locked_product data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/set_flexible_auto_subscribe.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::SetFlexibleAutoSubscribeParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = SetFlexibleAutoSubscribeParams::builder("1".to_string(), true).build()?; // Make the API call let response = rest_client .set_flexible_auto_subscribe(params) .await .context("set_flexible_auto_subscribe request failed")?; info!(?response.rate_limits, "set_flexible_auto_subscribe rate limits"); let data = response.data().await?; info!(?data, "set_flexible_auto_subscribe data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/set_locked_auto_subscribe.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::SetLockedAutoSubscribeParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = SetLockedAutoSubscribeParams::builder("1".to_string(), true).build()?; // Make the API call let response = rest_client .set_locked_auto_subscribe(params) .await .context("set_locked_auto_subscribe request failed")?; info!(?response.rate_limits, "set_locked_auto_subscribe rate limits"); let data = response.data().await?; info!(?data, "set_locked_auto_subscribe data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/set_locked_product_redeem_option.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::SetLockedProductRedeemOptionParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = SetLockedProductRedeemOptionParams::builder( "1".to_string(), "redeem_to_example".to_string(), ) .build()?; // Make the API call let response = rest_client .set_locked_product_redeem_option(params) .await .context("set_locked_product_redeem_option request failed")?; info!(?response.rate_limits, "set_locked_product_redeem_option rate limits"); let data = response.data().await?; info!(?data, "set_locked_product_redeem_option data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/simple_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::SimpleAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = SimpleAccountParams::default(); // Make the API call let response = rest_client .simple_account(params) .await .context("simple_account request failed")?; info!(?response.rate_limits, "simple_account rate limits"); let data = response.data().await?; info!(?data, "simple_account data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/subscribe_flexible_product.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::SubscribeFlexibleProductParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = SubscribeFlexibleProductParams::builder("1".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .subscribe_flexible_product(params) .await .context("subscribe_flexible_product request failed")?; info!(?response.rate_limits, "subscribe_flexible_product rate limits"); let data = response.data().await?; info!(?data, "subscribe_flexible_product data"); Ok(()) } examples/simple_earn/rest_api/flexible_locked_api/subscribe_locked_product.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::SubscribeLockedProductParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = SubscribeLockedProductParams::builder("1".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .subscribe_locked_product(params) .await .context("subscribe_locked_product request failed")?; info!(?response.rate_limits, "subscribe_locked_product rate limits"); let data = response.data().await?; info!(?data, "subscribe_locked_product data"); Ok(()) } examples/simple_earn/rest_api/rwusd_api/get_rwusd_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetRwusdAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetRwusdAccountParams::default(); // Make the API call let response = rest_client .get_rwusd_account(params) .await .context("get_rwusd_account request failed")?; info!(?response.rate_limits, "get_rwusd_account rate limits"); let data = response.data().await?; info!(?data, "get_rwusd_account data"); Ok(()) } examples/simple_earn/rest_api/rwusd_api/get_rwusd_quota_details.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetRwusdQuotaDetailsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetRwusdQuotaDetailsParams::default(); // Make the API call let response = rest_client .get_rwusd_quota_details(params) .await .context("get_rwusd_quota_details request failed")?; info!(?response.rate_limits, "get_rwusd_quota_details rate limits"); let data = response.data().await?; info!(?data, "get_rwusd_quota_details data"); Ok(()) } examples/simple_earn/rest_api/rwusd_api/get_rwusd_rate_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetRwusdRateHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetRwusdRateHistoryParams::default(); // Make the API call let response = rest_client .get_rwusd_rate_history(params) .await .context("get_rwusd_rate_history request failed")?; info!(?response.rate_limits, "get_rwusd_rate_history rate limits"); let data = response.data().await?; info!(?data, "get_rwusd_rate_history data"); Ok(()) } examples/simple_earn/rest_api/rwusd_api/get_rwusd_redemption_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetRwusdRedemptionHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetRwusdRedemptionHistoryParams::default(); // Make the API call let response = rest_client .get_rwusd_redemption_history(params) .await .context("get_rwusd_redemption_history request failed")?; info!(?response.rate_limits, "get_rwusd_redemption_history rate limits"); let data = response.data().await?; info!(?data, "get_rwusd_redemption_history data"); Ok(()) } examples/simple_earn/rest_api/rwusd_api/get_rwusd_rewards_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetRwusdRewardsHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetRwusdRewardsHistoryParams::default(); // Make the API call let response = rest_client .get_rwusd_rewards_history(params) .await .context("get_rwusd_rewards_history request failed")?; info!(?response.rate_limits, "get_rwusd_rewards_history rate limits"); let data = response.data().await?; info!(?data, "get_rwusd_rewards_history data"); Ok(()) } examples/simple_earn/rest_api/rwusd_api/get_rwusd_subscription_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::GetRwusdSubscriptionHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = GetRwusdSubscriptionHistoryParams::default(); // Make the API call let response = rest_client .get_rwusd_subscription_history(params) .await .context("get_rwusd_subscription_history request failed")?; info!(?response.rate_limits, "get_rwusd_subscription_history rate limits"); let data = response.data().await?; info!(?data, "get_rwusd_subscription_history data"); Ok(()) } examples/simple_earn/rest_api/rwusd_api/redeem_rwusd.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::RedeemRwusdParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = RedeemRwusdParams::builder(dec!(1.0), "s".to_string()).build()?; // Make the API call let response = rest_client .redeem_rwusd(params) .await .context("redeem_rwusd request failed")?; info!(?response.rate_limits, "redeem_rwusd rate limits"); let data = response.data().await?; info!(?data, "redeem_rwusd data"); Ok(()) } examples/simple_earn/rest_api/rwusd_api/subscribe_rwusd.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::simple_earn::{SimpleEarnRestApi, rest_api::SubscribeRwusdParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SimpleEarn REST API client let rest_client = SimpleEarnRestApi::production(rest_conf); // Setup the API parameters let params = SubscribeRwusdParams::builder("asset_example".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .subscribe_rwusd(params) .await .context("subscribe_rwusd request failed")?; info!(?response.rate_limits, "subscribe_rwusd rate limits"); let data = response.data().await?; info!(?data, "subscribe_rwusd data"); Ok(()) } examples/spot/rest_api/account_api/account_commission.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::AccountCommissionParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = AccountCommissionParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .account_commission(params) .await .context("account_commission request failed")?; info!(?response.rate_limits, "account_commission rate limits"); let data = response.data().await?; info!(?data, "account_commission data"); Ok(()) } examples/spot/rest_api/account_api/all_order_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::AllOrderListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = AllOrderListParams::default(); // Make the API call let response = rest_client .all_order_list(params) .await .context("all_order_list request failed")?; info!(?response.rate_limits, "all_order_list rate limits"); let data = response.data().await?; info!(?data, "all_order_list data"); Ok(()) } examples/spot/rest_api/account_api/all_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::AllOrdersParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = AllOrdersParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .all_orders(params) .await .context("all_orders request failed")?; info!(?response.rate_limits, "all_orders rate limits"); let data = response.data().await?; info!(?data, "all_orders data"); Ok(()) } examples/spot/rest_api/account_api/get_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::GetAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = GetAccountParams::default(); // Make the API call let response = rest_client .get_account(params) .await .context("get_account request failed")?; info!(?response.rate_limits, "get_account rate limits"); let data = response.data().await?; info!(?data, "get_account data"); Ok(()) } examples/spot/rest_api/account_api/get_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::GetOpenOrdersParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = GetOpenOrdersParams::default(); // Make the API call let response = rest_client .get_open_orders(params) .await .context("get_open_orders request failed")?; info!(?response.rate_limits, "get_open_orders rate limits"); let data = response.data().await?; info!(?data, "get_open_orders data"); Ok(()) } examples/spot/rest_api/account_api/get_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::GetOrderParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = GetOrderParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .get_order(params) .await .context("get_order request failed")?; info!(?response.rate_limits, "get_order rate limits"); let data = response.data().await?; info!(?data, "get_order data"); Ok(()) } examples/spot/rest_api/account_api/get_order_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::GetOrderListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = GetOrderListParams::default(); // Make the API call let response = rest_client .get_order_list(params) .await .context("get_order_list request failed")?; info!(?response.rate_limits, "get_order_list rate limits"); let data = response.data().await?; info!(?data, "get_order_list data"); Ok(()) } examples/spot/rest_api/account_api/my_allocations.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::MyAllocationsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = MyAllocationsParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .my_allocations(params) .await .context("my_allocations request failed")?; info!(?response.rate_limits, "my_allocations rate limits"); let data = response.data().await?; info!(?data, "my_allocations data"); Ok(()) } examples/spot/rest_api/account_api/my_filters.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::MyFiltersParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = MyFiltersParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .my_filters(params) .await .context("my_filters request failed")?; info!(?response.rate_limits, "my_filters rate limits"); let data = response.data().await?; info!(?data, "my_filters data"); Ok(()) } examples/spot/rest_api/account_api/my_prevented_matches.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::MyPreventedMatchesParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = MyPreventedMatchesParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .my_prevented_matches(params) .await .context("my_prevented_matches request failed")?; info!(?response.rate_limits, "my_prevented_matches rate limits"); let data = response.data().await?; info!(?data, "my_prevented_matches data"); Ok(()) } examples/spot/rest_api/account_api/my_trades.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::MyTradesParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = MyTradesParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .my_trades(params) .await .context("my_trades request failed")?; info!(?response.rate_limits, "my_trades rate limits"); let data = response.data().await?; info!(?data, "my_trades data"); Ok(()) } examples/spot/rest_api/account_api/open_order_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::OpenOrderListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = OpenOrderListParams::default(); // Make the API call let response = rest_client .open_order_list(params) .await .context("open_order_list request failed")?; info!(?response.rate_limits, "open_order_list rate limits"); let data = response.data().await?; info!(?data, "open_order_list data"); Ok(()) } examples/spot/rest_api/account_api/order_amendments.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::OrderAmendmentsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = OrderAmendmentsParams::builder("BNBUSDT".to_string(), 1).build()?; // Make the API call let response = rest_client .order_amendments(params) .await .context("order_amendments request failed")?; info!(?response.rate_limits, "order_amendments rate limits"); let data = response.data().await?; info!(?data, "order_amendments data"); Ok(()) } examples/spot/rest_api/account_api/rate_limit_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::RateLimitOrderParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = RateLimitOrderParams::default(); // Make the API call let response = rest_client .rate_limit_order(params) .await .context("rate_limit_order request failed")?; info!(?response.rate_limits, "rate_limit_order rate limits"); let data = response.data().await?; info!(?data, "rate_limit_order data"); Ok(()) } examples/spot/rest_api/general_api/exchange_info.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::ExchangeInfoParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = ExchangeInfoParams::default(); // Make the API call let response = rest_client .exchange_info(params) .await .context("exchange_info request failed")?; info!(?response.rate_limits, "exchange_info rate limits"); let data = response.data().await?; info!(?data, "exchange_info data"); Ok(()) } examples/spot/rest_api/general_api/ping.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::SpotRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Make the API call let response = rest_client.ping().await.context("ping request failed")?; info!(?response.rate_limits, "ping rate limits"); let data = response.data().await?; info!(?data, "ping data"); Ok(()) } examples/spot/rest_api/general_api/time.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::SpotRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Make the API call let response = rest_client.time().await.context("time request failed")?; info!(?response.rate_limits, "time rate limits"); let data = response.data().await?; info!(?data, "time data"); Ok(()) } examples/spot/rest_api/market_api/agg_trades.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::AggTradesParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = AggTradesParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .agg_trades(params) .await .context("agg_trades request failed")?; info!(?response.rate_limits, "agg_trades rate limits"); let data = response.data().await?; info!(?data, "agg_trades data"); Ok(()) } examples/spot/rest_api/market_api/avg_price.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::AvgPriceParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = AvgPriceParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .avg_price(params) .await .context("avg_price request failed")?; info!(?response.rate_limits, "avg_price rate limits"); let data = response.data().await?; info!(?data, "avg_price data"); Ok(()) } examples/spot/rest_api/market_api/depth.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::DepthParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = DepthParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .depth(params) .await .context("depth request failed")?; info!(?response.rate_limits, "depth rate limits"); let data = response.data().await?; info!(?data, "depth data"); Ok(()) } examples/spot/rest_api/market_api/get_trades.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::GetTradesParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = GetTradesParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .get_trades(params) .await .context("get_trades request failed")?; info!(?response.rate_limits, "get_trades rate limits"); let data = response.data().await?; info!(?data, "get_trades data"); Ok(()) } examples/spot/rest_api/market_api/historical_trades.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::HistoricalTradesParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = HistoricalTradesParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .historical_trades(params) .await .context("historical_trades request failed")?; info!(?response.rate_limits, "historical_trades rate limits"); let data = response.data().await?; info!(?data, "historical_trades data"); Ok(()) } examples/spot/rest_api/market_api/klines.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{KlinesIntervalEnum, KlinesParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = KlinesParams::builder("BNBUSDT".to_string(), KlinesIntervalEnum::Interval1s).build()?; // Make the API call let response = rest_client .klines(params) .await .context("klines request failed")?; info!(?response.rate_limits, "klines rate limits"); let data = response.data().await?; info!(?data, "klines data"); Ok(()) } examples/spot/rest_api/market_api/ticker.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::TickerParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = TickerParams::default(); // Make the API call let response = rest_client .ticker(params) .await .context("ticker request failed")?; info!(?response.rate_limits, "ticker rate limits"); let data = response.data().await?; info!(?data, "ticker data"); Ok(()) } examples/spot/rest_api/market_api/ticker24hr.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::Ticker24hrParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = Ticker24hrParams::default(); // Make the API call let response = rest_client .ticker24hr(params) .await .context("ticker24hr request failed")?; info!(?response.rate_limits, "ticker24hr rate limits"); let data = response.data().await?; info!(?data, "ticker24hr data"); Ok(()) } examples/spot/rest_api/market_api/ticker_book_ticker.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::TickerBookTickerParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = TickerBookTickerParams::default(); // Make the API call let response = rest_client .ticker_book_ticker(params) .await .context("ticker_book_ticker request failed")?; info!(?response.rate_limits, "ticker_book_ticker rate limits"); let data = response.data().await?; info!(?data, "ticker_book_ticker data"); Ok(()) } examples/spot/rest_api/market_api/ticker_price.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::TickerPriceParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = TickerPriceParams::default(); // Make the API call let response = rest_client .ticker_price(params) .await .context("ticker_price request failed")?; info!(?response.rate_limits, "ticker_price rate limits"); let data = response.data().await?; info!(?data, "ticker_price data"); Ok(()) } examples/spot/rest_api/market_api/ticker_trading_day.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::TickerTradingDayParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = TickerTradingDayParams::default(); // Make the API call let response = rest_client .ticker_trading_day(params) .await .context("ticker_trading_day request failed")?; info!(?response.rate_limits, "ticker_trading_day rate limits"); let data = response.data().await?; info!(?data, "ticker_trading_day data"); Ok(()) } examples/spot/rest_api/market_api/ui_klines.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{UiKlinesIntervalEnum, UiKlinesParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = UiKlinesParams::builder("BNBUSDT".to_string(), UiKlinesIntervalEnum::Interval1s).build()?; // Make the API call let response = rest_client .ui_klines(params) .await .context("ui_klines request failed")?; info!(?response.rate_limits, "ui_klines rate limits"); let data = response.data().await?; info!(?data, "ui_klines data"); Ok(()) } examples/spot/rest_api/trade_api/delete_open_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::DeleteOpenOrdersParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = DeleteOpenOrdersParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .delete_open_orders(params) .await .context("delete_open_orders request failed")?; info!(?response.rate_limits, "delete_open_orders rate limits"); let data = response.data().await?; info!(?data, "delete_open_orders data"); Ok(()) } examples/spot/rest_api/trade_api/delete_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::DeleteOrderParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = DeleteOrderParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .delete_order(params) .await .context("delete_order request failed")?; info!(?response.rate_limits, "delete_order rate limits"); let data = response.data().await?; info!(?data, "delete_order data"); Ok(()) } examples/spot/rest_api/trade_api/delete_order_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::DeleteOrderListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = DeleteOrderListParams::builder("BNBUSDT".to_string()).build()?; // Make the API call let response = rest_client .delete_order_list(params) .await .context("delete_order_list request failed")?; info!(?response.rate_limits, "delete_order_list rate limits"); let data = response.data().await?; info!(?data, "delete_order_list data"); Ok(()) } examples/spot/rest_api/trade_api/new_order.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{NewOrderParams, NewOrderSideEnum, NewOrderTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = NewOrderParams::builder( "BNBUSDT".to_string(), NewOrderSideEnum::Buy, NewOrderTypeEnum::Market, ) .build()?; // Make the API call let response = rest_client .new_order(params) .await .context("new_order request failed")?; info!(?response.rate_limits, "new_order rate limits"); let data = response.data().await?; info!(?data, "new_order data"); Ok(()) } examples/spot/rest_api/trade_api/order_amend_keep_priority.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{SpotRestApi, rest_api::OrderAmendKeepPriorityParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = OrderAmendKeepPriorityParams::builder("BNBUSDT".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .order_amend_keep_priority(params) .await .context("order_amend_keep_priority request failed")?; info!(?response.rate_limits, "order_amend_keep_priority rate limits"); let data = response.data().await?; info!(?data, "order_amend_keep_priority data"); Ok(()) } examples/spot/rest_api/trade_api/order_cancel_replace.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{ OrderCancelReplaceCancelReplaceModeEnum, OrderCancelReplaceParams, OrderCancelReplaceSideEnum, OrderCancelReplaceTypeEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = OrderCancelReplaceParams::builder( "BNBUSDT".to_string(), OrderCancelReplaceSideEnum::Buy, OrderCancelReplaceTypeEnum::Market, OrderCancelReplaceCancelReplaceModeEnum::StopOnFailure, ) .build()?; // Make the API call let response = rest_client .order_cancel_replace(params) .await .context("order_cancel_replace request failed")?; info!(?response.rate_limits, "order_cancel_replace rate limits"); let data = response.data().await?; info!(?data, "order_cancel_replace data"); Ok(()) } examples/spot/rest_api/trade_api/order_list_oco.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{ OrderListOcoAboveTypeEnum, OrderListOcoBelowTypeEnum, OrderListOcoParams, OrderListOcoSideEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = OrderListOcoParams::builder( "BNBUSDT".to_string(), OrderListOcoSideEnum::Buy, dec!(1.0), OrderListOcoAboveTypeEnum::StopLossLimit, OrderListOcoBelowTypeEnum::StopLoss, ) .build()?; // Make the API call let response = rest_client .order_list_oco(params) .await .context("order_list_oco request failed")?; info!(?response.rate_limits, "order_list_oco rate limits"); let data = response.data().await?; info!(?data, "order_list_oco data"); Ok(()) } examples/spot/rest_api/trade_api/order_list_oto.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{ OrderListOtoParams, OrderListOtoPendingSideEnum, OrderListOtoPendingTypeEnum, OrderListOtoWorkingSideEnum, OrderListOtoWorkingTypeEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = OrderListOtoParams::builder( "BNBUSDT".to_string(), OrderListOtoWorkingTypeEnum::Limit, OrderListOtoWorkingSideEnum::Buy, dec!(1.0), dec!(1.0), OrderListOtoPendingTypeEnum::Limit, OrderListOtoPendingSideEnum::Buy, dec!(1.0), ) .build()?; // Make the API call let response = rest_client .order_list_oto(params) .await .context("order_list_oto request failed")?; info!(?response.rate_limits, "order_list_oto rate limits"); let data = response.data().await?; info!(?data, "order_list_oto data"); Ok(()) } examples/spot/rest_api/trade_api/order_list_otoco.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{ OrderListOtocoParams, OrderListOtocoPendingAboveTypeEnum, OrderListOtocoPendingSideEnum, OrderListOtocoWorkingSideEnum, OrderListOtocoWorkingTypeEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = OrderListOtocoParams::builder( "BNBUSDT".to_string(), OrderListOtocoWorkingTypeEnum::Limit, OrderListOtocoWorkingSideEnum::Buy, dec!(1.0), dec!(1.0), OrderListOtocoPendingSideEnum::Buy, dec!(1.0), OrderListOtocoPendingAboveTypeEnum::StopLossLimit, ) .build()?; // Make the API call let response = rest_client .order_list_otoco(params) .await .context("order_list_otoco request failed")?; info!(?response.rate_limits, "order_list_otoco rate limits"); let data = response.data().await?; info!(?data, "order_list_otoco data"); Ok(()) } examples/spot/rest_api/trade_api/order_oco.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{OrderOcoParams, OrderOcoSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = OrderOcoParams::builder( "BNBUSDT".to_string(), OrderOcoSideEnum::Buy, dec!(1.0), dec!(1.0), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .order_oco(params) .await .context("order_oco request failed")?; info!(?response.rate_limits, "order_oco rate limits"); let data = response.data().await?; info!(?data, "order_oco data"); Ok(()) } examples/spot/rest_api/trade_api/order_test.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{OrderTestParams, OrderTestSideEnum, OrderTestTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = OrderTestParams::builder( "BNBUSDT".to_string(), OrderTestSideEnum::Buy, OrderTestTypeEnum::Market, ) .build()?; // Make the API call let response = rest_client .order_test(params) .await .context("order_test request failed")?; info!(?response.rate_limits, "order_test rate limits"); let data = response.data().await?; info!(?data, "order_test data"); Ok(()) } examples/spot/rest_api/trade_api/sor_order.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{SorOrderParams, SorOrderSideEnum, SorOrderTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = SorOrderParams::builder( "BNBUSDT".to_string(), SorOrderSideEnum::Buy, SorOrderTypeEnum::Market, dec!(1.0), ) .build()?; // Make the API call let response = rest_client .sor_order(params) .await .context("sor_order request failed")?; info!(?response.rate_limits, "sor_order rate limits"); let data = response.data().await?; info!(?data, "sor_order data"); Ok(()) } examples/spot/rest_api/trade_api/sor_order_test.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::spot::{ SpotRestApi, rest_api::{SorOrderTestParams, SorOrderTestSideEnum, SorOrderTestTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot REST API client let rest_client = SpotRestApi::production(rest_conf); // Setup the API parameters let params = SorOrderTestParams::builder( "BNBUSDT".to_string(), SorOrderTestSideEnum::Buy, SorOrderTestTypeEnum::Market, dec!(1.0), ) .build()?; // Make the API call let response = rest_client .sor_order_test(params) .await .context("sor_order_test request failed")?; info!(?response.rate_limits, "sor_order_test rate limits"); let data = response.data().await?; info!(?data, "sor_order_test data"); Ok(()) } examples/spot/websocket_api/account_api/account_commission.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::AccountCommissionParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = AccountCommissionParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .account_commission(params) .await .context("account_commission request failed")?; info!(?response.rate_limits, "account_commission rate limits"); let data = response.data()?; info!(?data, "account_commission data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/account_rate_limits_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::AccountRateLimitsOrdersParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = AccountRateLimitsOrdersParams::default(); // Make the WS API call let response = connection .account_rate_limits_orders(params) .await .context("account_rate_limits_orders request failed")?; info!(?response.rate_limits, "account_rate_limits_orders rate limits"); let data = response.data()?; info!(?data, "account_rate_limits_orders data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/account_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::AccountStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = AccountStatusParams::default(); // Make the WS API call let response = connection .account_status(params) .await .context("account_status request failed")?; info!(?response.rate_limits, "account_status rate limits"); let data = response.data()?; info!(?data, "account_status data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/all_order_lists.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::AllOrderListsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = AllOrderListsParams::default(); // Make the WS API call let response = connection .all_order_lists(params) .await .context("all_order_lists request failed")?; info!(?response.rate_limits, "all_order_lists rate limits"); let data = response.data()?; info!(?data, "all_order_lists data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/all_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::AllOrdersParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = AllOrdersParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .all_orders(params) .await .context("all_orders request failed")?; info!(?response.rate_limits, "all_orders rate limits"); let data = response.data()?; info!(?data, "all_orders data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/my_allocations.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::MyAllocationsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = MyAllocationsParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .my_allocations(params) .await .context("my_allocations request failed")?; info!(?response.rate_limits, "my_allocations rate limits"); let data = response.data()?; info!(?data, "my_allocations data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/my_filters.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::MyFiltersParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = MyFiltersParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .my_filters(params) .await .context("my_filters request failed")?; info!(?response.rate_limits, "my_filters rate limits"); let data = response.data()?; info!(?data, "my_filters data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/my_prevented_matches.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::MyPreventedMatchesParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = MyPreventedMatchesParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .my_prevented_matches(params) .await .context("my_prevented_matches request failed")?; info!(?response.rate_limits, "my_prevented_matches rate limits"); let data = response.data()?; info!(?data, "my_prevented_matches data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/my_trades.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::MyTradesParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = MyTradesParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .my_trades(params) .await .context("my_trades request failed")?; info!(?response.rate_limits, "my_trades rate limits"); let data = response.data()?; info!(?data, "my_trades data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/open_order_lists_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::OpenOrderListsStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OpenOrderListsStatusParams::default(); // Make the WS API call let response = connection .open_order_lists_status(params) .await .context("open_order_lists_status request failed")?; info!(?response.rate_limits, "open_order_lists_status rate limits"); let data = response.data()?; info!(?data, "open_order_lists_status data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/open_orders_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::OpenOrdersStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OpenOrdersStatusParams::default(); // Make the WS API call let response = connection .open_orders_status(params) .await .context("open_orders_status request failed")?; info!(?response.rate_limits, "open_orders_status rate limits"); let data = response.data()?; info!(?data, "open_orders_status data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/order_amendments.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::OrderAmendmentsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderAmendmentsParams::builder("BNBUSDT".to_string(), 1).build()?; // Make the WS API call let response = connection .order_amendments(params) .await .context("order_amendments request failed")?; info!(?response.rate_limits, "order_amendments rate limits"); let data = response.data()?; info!(?data, "order_amendments data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/order_list_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::OrderListStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderListStatusParams::default(); // Make the WS API call let response = connection .order_list_status(params) .await .context("order_list_status request failed")?; info!(?response.rate_limits, "order_list_status rate limits"); let data = response.data()?; info!(?data, "order_list_status data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/account_api/order_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::OrderStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderStatusParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .order_status(params) .await .context("order_status request failed")?; info!(?response.rate_limits, "order_status rate limits"); let data = response.data()?; info!(?data, "order_status data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/auth_api/session_logon.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::config::PrivateKey; use binance_sdk::spot::{SpotWsApi, websocket_api::SessionLogonParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .private_key(PrivateKey::File("your-private-key-file-path".to_string())) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = SessionLogonParams::default(); // Make the WS API call let response = connection .session_logon(params) .await .context("session_logon request failed")?; for (idx, resp) in response.into_iter().enumerate() { info!(response_index = idx, ?resp.rate_limits, "session_logon rate limits"); let data = resp.data()?; info!(response_index = idx, ?data, "session_logon data"); } // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/auth_api/session_logout.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::SessionLogoutParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = SessionLogoutParams::default(); // Make the WS API call let response = connection .session_logout(params) .await .context("session_logout request failed")?; for (idx, resp) in response.into_iter().enumerate() { info!(response_index = idx, ?resp.rate_limits, "session_logon rate limits"); let data = resp.data()?; info!(response_index = idx, ?data, "session_logon data"); } // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/auth_api/session_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::SessionStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = SessionStatusParams::default(); // Make the WS API call let response = connection .session_status(params) .await .context("session_status request failed")?; info!(?response.rate_limits, "session_status rate limits"); let data = response.data()?; info!(?data, "session_status data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/general_api/exchange_info.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::ExchangeInfoParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = ExchangeInfoParams::default(); // Make the WS API call let response = connection .exchange_info(params) .await .context("exchange_info request failed")?; info!(?response.rate_limits, "exchange_info rate limits"); let data = response.data()?; info!(?data, "exchange_info data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/general_api/ping.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::PingParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = PingParams::default(); // Make the WS API call let response = connection .ping(params) .await .context("ping request failed")?; info!(?response.rate_limits, "ping rate limits"); let data = response.data()?; info!(?data, "ping data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/general_api/time.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::TimeParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = TimeParams::default(); // Make the WS API call let response = connection .time(params) .await .context("time request failed")?; info!(?response.rate_limits, "time rate limits"); let data = response.data()?; info!(?data, "time data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/avg_price.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::AvgPriceParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = AvgPriceParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .avg_price(params) .await .context("avg_price request failed")?; info!(?response.rate_limits, "avg_price rate limits"); let data = response.data()?; info!(?data, "avg_price data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/depth.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::DepthParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = DepthParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .depth(params) .await .context("depth request failed")?; info!(?response.rate_limits, "depth rate limits"); let data = response.data()?; info!(?data, "depth data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/klines.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{KlinesIntervalEnum, KlinesParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = KlinesParams::builder("BNBUSDT".to_string(), KlinesIntervalEnum::Interval1s).build()?; // Make the WS API call let response = connection .klines(params) .await .context("klines request failed")?; info!(?response.rate_limits, "klines rate limits"); let data = response.data()?; info!(?data, "klines data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/ticker.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::TickerParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = TickerParams::default(); // Make the WS API call let response = connection .ticker(params) .await .context("ticker request failed")?; info!(?response.rate_limits, "ticker rate limits"); let data = response.data()?; info!(?data, "ticker data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/ticker24hr.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::Ticker24hrParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = Ticker24hrParams::default(); // Make the WS API call let response = connection .ticker24hr(params) .await .context("ticker24hr request failed")?; info!(?response.rate_limits, "ticker24hr rate limits"); let data = response.data()?; info!(?data, "ticker24hr data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/ticker_book.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::TickerBookParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = TickerBookParams::default(); // Make the WS API call let response = connection .ticker_book(params) .await .context("ticker_book request failed")?; info!(?response.rate_limits, "ticker_book rate limits"); let data = response.data()?; info!(?data, "ticker_book data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/ticker_price.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::TickerPriceParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = TickerPriceParams::default(); // Make the WS API call let response = connection .ticker_price(params) .await .context("ticker_price request failed")?; info!(?response.rate_limits, "ticker_price rate limits"); let data = response.data()?; info!(?data, "ticker_price data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/ticker_trading_day.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::TickerTradingDayParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = TickerTradingDayParams::default(); // Make the WS API call let response = connection .ticker_trading_day(params) .await .context("ticker_trading_day request failed")?; info!(?response.rate_limits, "ticker_trading_day rate limits"); let data = response.data()?; info!(?data, "ticker_trading_day data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/trades_aggregate.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::TradesAggregateParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = TradesAggregateParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .trades_aggregate(params) .await .context("trades_aggregate request failed")?; info!(?response.rate_limits, "trades_aggregate rate limits"); let data = response.data()?; info!(?data, "trades_aggregate data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/trades_historical.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::TradesHistoricalParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = TradesHistoricalParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .trades_historical(params) .await .context("trades_historical request failed")?; info!(?response.rate_limits, "trades_historical rate limits"); let data = response.data()?; info!(?data, "trades_historical data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/trades_recent.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::TradesRecentParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = TradesRecentParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .trades_recent(params) .await .context("trades_recent request failed")?; info!(?response.rate_limits, "trades_recent rate limits"); let data = response.data()?; info!(?data, "trades_recent data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/market_api/ui_klines.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{UiKlinesIntervalEnum, UiKlinesParams}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = UiKlinesParams::builder("BNBUSDT".to_string(), UiKlinesIntervalEnum::Interval1s).build()?; // Make the WS API call let response = connection .ui_klines(params) .await .context("ui_klines request failed")?; info!(?response.rate_limits, "ui_klines rate limits"); let data = response.data()?; info!(?data, "ui_klines data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/open_orders_cancel_all.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::OpenOrdersCancelAllParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OpenOrdersCancelAllParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .open_orders_cancel_all(params) .await .context("open_orders_cancel_all request failed")?; info!(?response.rate_limits, "open_orders_cancel_all rate limits"); let data = response.data()?; info!(?data, "open_orders_cancel_all data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/order_amend_keep_priority.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::OrderAmendKeepPriorityParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderAmendKeepPriorityParams::builder("BNBUSDT".to_string(), dec!(1.0)).build()?; // Make the WS API call let response = connection .order_amend_keep_priority(params) .await .context("order_amend_keep_priority request failed")?; info!(?response.rate_limits, "order_amend_keep_priority rate limits"); let data = response.data()?; info!(?data, "order_amend_keep_priority data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/order_cancel.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::OrderCancelParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderCancelParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .order_cancel(params) .await .context("order_cancel request failed")?; info!(?response.rate_limits, "order_cancel rate limits"); let data = response.data()?; info!(?data, "order_cancel data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/order_cancel_replace.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{ OrderCancelReplaceCancelReplaceModeEnum, OrderCancelReplaceParams, OrderCancelReplaceSideEnum, OrderCancelReplaceTypeEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderCancelReplaceParams::builder( "BNBUSDT".to_string(), OrderCancelReplaceCancelReplaceModeEnum::StopOnFailure, OrderCancelReplaceSideEnum::Buy, OrderCancelReplaceTypeEnum::Market, ) .build()?; // Make the WS API call let response = connection .order_cancel_replace(params) .await .context("order_cancel_replace request failed")?; info!(?response.rate_limits, "order_cancel_replace rate limits"); let data = response.data()?; info!(?data, "order_cancel_replace data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/order_list_cancel.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::OrderListCancelParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderListCancelParams::builder("BNBUSDT".to_string()).build()?; // Make the WS API call let response = connection .order_list_cancel(params) .await .context("order_list_cancel request failed")?; info!(?response.rate_limits, "order_list_cancel rate limits"); let data = response.data()?; info!(?data, "order_list_cancel data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/order_list_place.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{OrderListPlaceParams, OrderListPlaceSideEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderListPlaceParams::builder( "BNBUSDT".to_string(), OrderListPlaceSideEnum::Buy, dec!(1.0), dec!(1.0), ) .build()?; // Make the WS API call let response = connection .order_list_place(params) .await .context("order_list_place request failed")?; info!(?response.rate_limits, "order_list_place rate limits"); let data = response.data()?; info!(?data, "order_list_place data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/order_list_place_oco.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{ OrderListPlaceOcoAboveTypeEnum, OrderListPlaceOcoBelowTypeEnum, OrderListPlaceOcoParams, OrderListPlaceOcoSideEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderListPlaceOcoParams::builder( "BNBUSDT".to_string(), OrderListPlaceOcoSideEnum::Buy, dec!(1.0), OrderListPlaceOcoAboveTypeEnum::StopLossLimit, OrderListPlaceOcoBelowTypeEnum::StopLoss, ) .build()?; // Make the WS API call let response = connection .order_list_place_oco(params) .await .context("order_list_place_oco request failed")?; info!(?response.rate_limits, "order_list_place_oco rate limits"); let data = response.data()?; info!(?data, "order_list_place_oco data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/order_list_place_oto.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{ OrderListPlaceOtoParams, OrderListPlaceOtoPendingSideEnum, OrderListPlaceOtoPendingTypeEnum, OrderListPlaceOtoWorkingSideEnum, OrderListPlaceOtoWorkingTypeEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderListPlaceOtoParams::builder( "BNBUSDT".to_string(), OrderListPlaceOtoWorkingTypeEnum::Limit, OrderListPlaceOtoWorkingSideEnum::Buy, dec!(1.0), dec!(1.0), OrderListPlaceOtoPendingTypeEnum::Limit, OrderListPlaceOtoPendingSideEnum::Buy, dec!(1.0), ) .build()?; // Make the WS API call let response = connection .order_list_place_oto(params) .await .context("order_list_place_oto request failed")?; info!(?response.rate_limits, "order_list_place_oto rate limits"); let data = response.data()?; info!(?data, "order_list_place_oto data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/order_list_place_otoco.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{ OrderListPlaceOtocoParams, OrderListPlaceOtocoPendingAboveTypeEnum, OrderListPlaceOtocoPendingSideEnum, OrderListPlaceOtocoWorkingSideEnum, OrderListPlaceOtocoWorkingTypeEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderListPlaceOtocoParams::builder( "BNBUSDT".to_string(), OrderListPlaceOtocoWorkingTypeEnum::Limit, OrderListPlaceOtocoWorkingSideEnum::Buy, dec!(1.0), dec!(1.0), OrderListPlaceOtocoPendingSideEnum::Buy, dec!(1.0), OrderListPlaceOtocoPendingAboveTypeEnum::StopLossLimit, ) .build()?; // Make the WS API call let response = connection .order_list_place_otoco(params) .await .context("order_list_place_otoco request failed")?; info!(?response.rate_limits, "order_list_place_otoco rate limits"); let data = response.data()?; info!(?data, "order_list_place_otoco data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/order_place.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{OrderPlaceParams, OrderPlaceSideEnum, OrderPlaceTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderPlaceParams::builder( "BNBUSDT".to_string(), OrderPlaceSideEnum::Buy, OrderPlaceTypeEnum::Market, ) .build()?; // Make the WS API call let response = connection .order_place(params) .await .context("order_place request failed")?; info!(?response.rate_limits, "order_place rate limits"); let data = response.data()?; info!(?data, "order_place data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/order_test.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{OrderTestParams, OrderTestSideEnum, OrderTestTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = OrderTestParams::builder( "BNBUSDT".to_string(), OrderTestSideEnum::Buy, OrderTestTypeEnum::Market, ) .build()?; // Make the WS API call let response = connection .order_test(params) .await .context("order_test request failed")?; info!(?response.rate_limits, "order_test rate limits"); let data = response.data()?; info!(?data, "order_test data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/sor_order_place.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{SorOrderPlaceParams, SorOrderPlaceSideEnum, SorOrderPlaceTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = SorOrderPlaceParams::builder( "BNBUSDT".to_string(), SorOrderPlaceSideEnum::Buy, SorOrderPlaceTypeEnum::Market, dec!(1.0), ) .build()?; // Make the WS API call let response = connection .sor_order_place(params) .await .context("sor_order_place request failed")?; info!(?response.rate_limits, "sor_order_place rate limits"); let data = response.data()?; info!(?data, "sor_order_place data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/trade_api/sor_order_test.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{ SpotWsApi, websocket_api::{SorOrderTestParams, SorOrderTestSideEnum, SorOrderTestTypeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = SorOrderTestParams::builder( "BNBUSDT".to_string(), SorOrderTestSideEnum::Buy, SorOrderTestTypeEnum::Market, dec!(1.0), ) .build()?; // Make the WS API call let response = connection .sor_order_test(params) .await .context("sor_order_test request failed")?; info!(?response.rate_limits, "sor_order_test rate limits"); let data = response.data()?; info!(?data, "sor_order_test data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/user_data_stream_api/session_subscriptions.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::SessionSubscriptionsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = SessionSubscriptionsParams::default(); // Make the WS API call let response = connection .session_subscriptions(params) .await .context("session_subscriptions request failed")?; info!(?response.rate_limits, "session_subscriptions rate limits"); let data = response.data()?; info!(?data, "session_subscriptions data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/user_data_stream_api/user_data_stream_subscribe.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::UserDataStreamSubscribeParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = UserDataStreamSubscribeParams::default(); // Make the WS API call let (response, stream) = connection .user_data_stream_subscribe(params) .await .context("user_data_stream_subscribe request failed")?; info!(?response.rate_limits, "user_data_stream_subscribe rate limits"); let data = response.data()?; info!(?data, "user_data_stream_subscribe data"); stream.on_message(|data| { info!(?data, "user_data_stream_subscribe stream data"); }); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/user_data_stream_api/user_data_stream_subscribe_signature.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::UserDataStreamSubscribeSignatureParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = UserDataStreamSubscribeSignatureParams::default(); // Make the WS API call let (response, stream) = connection .user_data_stream_subscribe_signature(params) .await .context("user_data_stream_subscribe_signature request failed")?; info!(?response.rate_limits, "user_data_stream_subscribe_signature rate limits"); let data = response.data()?; info!(?data, "user_data_stream_subscribe_signature data"); stream.on_message(|data| { info!(?data, "user_data_stream_subscribe_signature stream data"); }); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_api/user_data_stream_api/user_data_stream_unsubscribe.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationWebsocketApi; use binance_sdk::spot::{SpotWsApi, websocket_api::UserDataStreamUnsubscribeParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").expect("API_KEY must be set in the environment"); let api_secret = env::var("API_SECRET").expect("API_SECRET must be set in the environment"); // Build WebSocket API config let ws_api_conf = ConfigurationWebsocketApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Spot WebSocket API client let ws_api_client = SpotWsApi::production(ws_api_conf); // Connect to WebSocket let connection = ws_api_client .connect() .await .context("Failed to connect to WebSocket API")?; // Setup the WS API parameters let params = UserDataStreamUnsubscribeParams::default(); // Make the WS API call let response = connection .user_data_stream_unsubscribe(params) .await .context("user_data_stream_unsubscribe request failed")?; info!(?response.rate_limits, "user_data_stream_unsubscribe rate limits"); let data = response.data()?; info!(?data, "user_data_stream_unsubscribe data"); // Cleanly disconnect connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/agg_trade.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{SpotWsStreams, websocket_streams::AggTradeParams}; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AggTradeParams::builder("bnbusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .agg_trade(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/all_market_rolling_window_ticker.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{ SpotWsStreams, websocket_streams::{ AllMarketRollingWindowTickerParams, AllMarketRollingWindowTickerWindowSizeEnum, }, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllMarketRollingWindowTickerParams::builder( AllMarketRollingWindowTickerWindowSizeEnum::WindowSize1h, ) .build()?; // Subscribe to the stream let stream = connection .all_market_rolling_window_ticker(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/all_mini_ticker.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{SpotWsStreams, websocket_streams::AllMiniTickerParams}; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllMiniTickerParams::default(); // Subscribe to the stream let stream = connection .all_mini_ticker(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/all_ticker.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{SpotWsStreams, websocket_streams::AllTickerParams}; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AllTickerParams::default(); // Subscribe to the stream let stream = connection .all_ticker(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/avg_price.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{SpotWsStreams, websocket_streams::AvgPriceParams}; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = AvgPriceParams::builder("bnbusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .avg_price(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/book_ticker.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{SpotWsStreams, websocket_streams::BookTickerParams}; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = BookTickerParams::builder("bnbusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .book_ticker(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/diff_book_depth.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{SpotWsStreams, websocket_streams::DiffBookDepthParams}; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = DiffBookDepthParams::builder("bnbusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .diff_book_depth(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/kline.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{ SpotWsStreams, websocket_streams::{KlineIntervalEnum, KlineParams}, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = KlineParams::builder("bnbusdt".to_string(), KlineIntervalEnum::Interval1s).build()?; // Subscribe to the stream let stream = connection .kline(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/kline_offset.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{ SpotWsStreams, websocket_streams::{KlineOffsetIntervalEnum, KlineOffsetParams}, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = KlineOffsetParams::builder("bnbusdt".to_string(), KlineOffsetIntervalEnum::Interval1s) .build()?; // Subscribe to the stream let stream = connection .kline_offset(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/mini_ticker.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{SpotWsStreams, websocket_streams::MiniTickerParams}; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = MiniTickerParams::builder("bnbusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .mini_ticker(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/partial_book_depth.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{ SpotWsStreams, websocket_streams::{PartialBookDepthLevelsEnum, PartialBookDepthParams}, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = PartialBookDepthParams::builder("bnbusdt".to_string(), PartialBookDepthLevelsEnum::Levels5) .build()?; // Subscribe to the stream let stream = connection .partial_book_depth(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/rolling_window_ticker.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{ SpotWsStreams, websocket_streams::{RollingWindowTickerParams, RollingWindowTickerWindowSizeEnum}, }; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = RollingWindowTickerParams::builder( "bnbusdt".to_string(), RollingWindowTickerWindowSizeEnum::WindowSize1h, ) .build()?; // Subscribe to the stream let stream = connection .rolling_window_ticker(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/ticker.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{SpotWsStreams, websocket_streams::TickerParams}; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = TickerParams::builder("bnbusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .ticker(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/spot/websocket_streams/trade.rs // Class name: web_socket_streams_api use anyhow::{Context, Result}; use tokio::time::{Duration, sleep}; use tracing::info; use binance_sdk::config::ConfigurationWebsocketStreams; use binance_sdk::spot::{SpotWsStreams, websocket_streams::TradeParams}; #[tokio::main] async fn main() -> Result<()> { // Build WebSocket Streams config let ws_streams_conf = ConfigurationWebsocketStreams::builder().build()?; // Create the Spot WebSocket Streams client let ws_streams_client = SpotWsStreams::production(ws_streams_conf); // Connect to WebSocket let connection = ws_streams_client .connect() .await .context("Failed to connect to WebSocket Streams")?; // Setup the stream parameters let params = TradeParams::builder("bnbusdt".to_string()).build()?; // Subscribe to the stream let stream = connection .trade(params) .await .context("Failed to subscribe to the stream")?; // Register callback for incoming messages stream.on_message(|data| { info!("{:?}", data); }); // Disconnect after 20 seconds sleep(Duration::from_secs(20)).await; connection .disconnect() .await .context("Failed to disconnect WebSocket client")?; Ok(()) } examples/staking/rest_api/eth_staking_api/eth_staking_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::EthStakingAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = EthStakingAccountParams::default(); // Make the API call let response = rest_client .eth_staking_account(params) .await .context("eth_staking_account request failed")?; info!(?response.rate_limits, "eth_staking_account rate limits"); let data = response.data().await?; info!(?data, "eth_staking_account data"); Ok(()) } examples/staking/rest_api/eth_staking_api/get_current_eth_staking_quota.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetCurrentEthStakingQuotaParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetCurrentEthStakingQuotaParams::default(); // Make the API call let response = rest_client .get_current_eth_staking_quota(params) .await .context("get_current_eth_staking_quota request failed")?; info!(?response.rate_limits, "get_current_eth_staking_quota rate limits"); let data = response.data().await?; info!(?data, "get_current_eth_staking_quota data"); Ok(()) } examples/staking/rest_api/eth_staking_api/get_eth_redemption_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetEthRedemptionHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetEthRedemptionHistoryParams::default(); // Make the API call let response = rest_client .get_eth_redemption_history(params) .await .context("get_eth_redemption_history request failed")?; info!(?response.rate_limits, "get_eth_redemption_history rate limits"); let data = response.data().await?; info!(?data, "get_eth_redemption_history data"); Ok(()) } examples/staking/rest_api/eth_staking_api/get_eth_staking_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetEthStakingHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetEthStakingHistoryParams::default(); // Make the API call let response = rest_client .get_eth_staking_history(params) .await .context("get_eth_staking_history request failed")?; info!(?response.rate_limits, "get_eth_staking_history rate limits"); let data = response.data().await?; info!(?data, "get_eth_staking_history data"); Ok(()) } examples/staking/rest_api/eth_staking_api/get_wbeth_rate_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetWbethRateHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetWbethRateHistoryParams::default(); // Make the API call let response = rest_client .get_wbeth_rate_history(params) .await .context("get_wbeth_rate_history request failed")?; info!(?response.rate_limits, "get_wbeth_rate_history rate limits"); let data = response.data().await?; info!(?data, "get_wbeth_rate_history data"); Ok(()) } examples/staking/rest_api/eth_staking_api/get_wbeth_rewards_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetWbethRewardsHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetWbethRewardsHistoryParams::default(); // Make the API call let response = rest_client .get_wbeth_rewards_history(params) .await .context("get_wbeth_rewards_history request failed")?; info!(?response.rate_limits, "get_wbeth_rewards_history rate limits"); let data = response.data().await?; info!(?data, "get_wbeth_rewards_history data"); Ok(()) } examples/staking/rest_api/eth_staking_api/get_wbeth_unwrap_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetWbethUnwrapHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetWbethUnwrapHistoryParams::default(); // Make the API call let response = rest_client .get_wbeth_unwrap_history(params) .await .context("get_wbeth_unwrap_history request failed")?; info!(?response.rate_limits, "get_wbeth_unwrap_history rate limits"); let data = response.data().await?; info!(?data, "get_wbeth_unwrap_history data"); Ok(()) } examples/staking/rest_api/eth_staking_api/get_wbeth_wrap_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetWbethWrapHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetWbethWrapHistoryParams::default(); // Make the API call let response = rest_client .get_wbeth_wrap_history(params) .await .context("get_wbeth_wrap_history request failed")?; info!(?response.rate_limits, "get_wbeth_wrap_history rate limits"); let data = response.data().await?; info!(?data, "get_wbeth_wrap_history data"); Ok(()) } examples/staking/rest_api/eth_staking_api/redeem_eth.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::RedeemEthParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = RedeemEthParams::builder(dec!(1.0)).build()?; // Make the API call let response = rest_client .redeem_eth(params) .await .context("redeem_eth request failed")?; info!(?response.rate_limits, "redeem_eth rate limits"); let data = response.data().await?; info!(?data, "redeem_eth data"); Ok(()) } examples/staking/rest_api/eth_staking_api/subscribe_eth_staking.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::SubscribeEthStakingParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = SubscribeEthStakingParams::builder(dec!(1.0)).build()?; // Make the API call let response = rest_client .subscribe_eth_staking(params) .await .context("subscribe_eth_staking request failed")?; info!(?response.rate_limits, "subscribe_eth_staking rate limits"); let data = response.data().await?; info!(?data, "subscribe_eth_staking data"); Ok(()) } examples/staking/rest_api/eth_staking_api/wrap_beth.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::WrapBethParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = WrapBethParams::builder(dec!(1.0)).build()?; // Make the API call let response = rest_client .wrap_beth(params) .await .context("wrap_beth request failed")?; info!(?response.rate_limits, "wrap_beth rate limits"); let data = response.data().await?; info!(?data, "wrap_beth data"); Ok(()) } examples/staking/rest_api/on_chain_yields_api/get_on_chain_yields_locked_personal_left_quota.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{ StakingRestApi, rest_api::GetOnChainYieldsLockedPersonalLeftQuotaParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetOnChainYieldsLockedPersonalLeftQuotaParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .get_on_chain_yields_locked_personal_left_quota(params) .await .context("get_on_chain_yields_locked_personal_left_quota request failed")?; info!(?response.rate_limits, "get_on_chain_yields_locked_personal_left_quota rate limits"); let data = response.data().await?; info!(?data, "get_on_chain_yields_locked_personal_left_quota data"); Ok(()) } examples/staking/rest_api/on_chain_yields_api/get_on_chain_yields_locked_product_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetOnChainYieldsLockedProductListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetOnChainYieldsLockedProductListParams::default(); // Make the API call let response = rest_client .get_on_chain_yields_locked_product_list(params) .await .context("get_on_chain_yields_locked_product_list request failed")?; info!(?response.rate_limits, "get_on_chain_yields_locked_product_list rate limits"); let data = response.data().await?; info!(?data, "get_on_chain_yields_locked_product_list data"); Ok(()) } examples/staking/rest_api/on_chain_yields_api/get_on_chain_yields_locked_product_position.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetOnChainYieldsLockedProductPositionParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetOnChainYieldsLockedProductPositionParams::default(); // Make the API call let response = rest_client .get_on_chain_yields_locked_product_position(params) .await .context("get_on_chain_yields_locked_product_position request failed")?; info!(?response.rate_limits, "get_on_chain_yields_locked_product_position rate limits"); let data = response.data().await?; info!(?data, "get_on_chain_yields_locked_product_position data"); Ok(()) } examples/staking/rest_api/on_chain_yields_api/get_on_chain_yields_locked_redemption_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{ StakingRestApi, rest_api::GetOnChainYieldsLockedRedemptionRecordParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetOnChainYieldsLockedRedemptionRecordParams::default(); // Make the API call let response = rest_client .get_on_chain_yields_locked_redemption_record(params) .await .context("get_on_chain_yields_locked_redemption_record request failed")?; info!(?response.rate_limits, "get_on_chain_yields_locked_redemption_record rate limits"); let data = response.data().await?; info!(?data, "get_on_chain_yields_locked_redemption_record data"); Ok(()) } examples/staking/rest_api/on_chain_yields_api/get_on_chain_yields_locked_rewards_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetOnChainYieldsLockedRewardsHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetOnChainYieldsLockedRewardsHistoryParams::default(); // Make the API call let response = rest_client .get_on_chain_yields_locked_rewards_history(params) .await .context("get_on_chain_yields_locked_rewards_history request failed")?; info!(?response.rate_limits, "get_on_chain_yields_locked_rewards_history rate limits"); let data = response.data().await?; info!(?data, "get_on_chain_yields_locked_rewards_history data"); Ok(()) } examples/staking/rest_api/on_chain_yields_api/get_on_chain_yields_locked_subscription_preview.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{ StakingRestApi, rest_api::GetOnChainYieldsLockedSubscriptionPreviewParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetOnChainYieldsLockedSubscriptionPreviewParams::builder("1".to_string(), dec!(1.0)) .build()?; // Make the API call let response = rest_client .get_on_chain_yields_locked_subscription_preview(params) .await .context("get_on_chain_yields_locked_subscription_preview request failed")?; info!(?response.rate_limits, "get_on_chain_yields_locked_subscription_preview rate limits"); let data = response.data().await?; info!( ?data, "get_on_chain_yields_locked_subscription_preview data" ); Ok(()) } examples/staking/rest_api/on_chain_yields_api/get_on_chain_yields_locked_subscription_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{ StakingRestApi, rest_api::GetOnChainYieldsLockedSubscriptionRecordParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetOnChainYieldsLockedSubscriptionRecordParams::default(); // Make the API call let response = rest_client .get_on_chain_yields_locked_subscription_record(params) .await .context("get_on_chain_yields_locked_subscription_record request failed")?; info!(?response.rate_limits, "get_on_chain_yields_locked_subscription_record rate limits"); let data = response.data().await?; info!(?data, "get_on_chain_yields_locked_subscription_record data"); Ok(()) } examples/staking/rest_api/on_chain_yields_api/on_chain_yields_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::OnChainYieldsAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = OnChainYieldsAccountParams::default(); // Make the API call let response = rest_client .on_chain_yields_account(params) .await .context("on_chain_yields_account request failed")?; info!(?response.rate_limits, "on_chain_yields_account rate limits"); let data = response.data().await?; info!(?data, "on_chain_yields_account data"); Ok(()) } examples/staking/rest_api/on_chain_yields_api/redeem_on_chain_yields_locked_product.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::RedeemOnChainYieldsLockedProductParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = RedeemOnChainYieldsLockedProductParams::builder("1".to_string()).build()?; // Make the API call let response = rest_client .redeem_on_chain_yields_locked_product(params) .await .context("redeem_on_chain_yields_locked_product request failed")?; info!(?response.rate_limits, "redeem_on_chain_yields_locked_product rate limits"); let data = response.data().await?; info!(?data, "redeem_on_chain_yields_locked_product data"); Ok(()) } examples/staking/rest_api/on_chain_yields_api/set_on_chain_yields_locked_auto_subscribe.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::SetOnChainYieldsLockedAutoSubscribeParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = SetOnChainYieldsLockedAutoSubscribeParams::builder("1".to_string(), true).build()?; // Make the API call let response = rest_client .set_on_chain_yields_locked_auto_subscribe(params) .await .context("set_on_chain_yields_locked_auto_subscribe request failed")?; info!(?response.rate_limits, "set_on_chain_yields_locked_auto_subscribe rate limits"); let data = response.data().await?; info!(?data, "set_on_chain_yields_locked_auto_subscribe data"); Ok(()) } examples/staking/rest_api/on_chain_yields_api/set_on_chain_yields_locked_product_redeem_option.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{ StakingRestApi, rest_api::SetOnChainYieldsLockedProductRedeemOptionParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = SetOnChainYieldsLockedProductRedeemOptionParams::builder( "1".to_string(), "redeem_to_example".to_string(), ) .build()?; // Make the API call let response = rest_client .set_on_chain_yields_locked_product_redeem_option(params) .await .context("set_on_chain_yields_locked_product_redeem_option request failed")?; info!(?response.rate_limits, "set_on_chain_yields_locked_product_redeem_option rate limits"); let data = response.data().await?; info!( ?data, "set_on_chain_yields_locked_product_redeem_option data" ); Ok(()) } examples/staking/rest_api/on_chain_yields_api/subscribe_on_chain_yields_locked_product.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::SubscribeOnChainYieldsLockedProductParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = SubscribeOnChainYieldsLockedProductParams::builder("1".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .subscribe_on_chain_yields_locked_product(params) .await .context("subscribe_on_chain_yields_locked_product request failed")?; info!(?response.rate_limits, "subscribe_on_chain_yields_locked_product rate limits"); let data = response.data().await?; info!(?data, "subscribe_on_chain_yields_locked_product data"); Ok(()) } examples/staking/rest_api/soft_staking_api/get_soft_staking_product_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetSoftStakingProductListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetSoftStakingProductListParams::default(); // Make the API call let response = rest_client .get_soft_staking_product_list(params) .await .context("get_soft_staking_product_list request failed")?; info!(?response.rate_limits, "get_soft_staking_product_list rate limits"); let data = response.data().await?; info!(?data, "get_soft_staking_product_list data"); Ok(()) } examples/staking/rest_api/soft_staking_api/get_soft_staking_rewards_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetSoftStakingRewardsHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetSoftStakingRewardsHistoryParams::default(); // Make the API call let response = rest_client .get_soft_staking_rewards_history(params) .await .context("get_soft_staking_rewards_history request failed")?; info!(?response.rate_limits, "get_soft_staking_rewards_history rate limits"); let data = response.data().await?; info!(?data, "get_soft_staking_rewards_history data"); Ok(()) } examples/staking/rest_api/soft_staking_api/set_soft_staking.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::SetSoftStakingParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = SetSoftStakingParams::builder(true).build()?; // Make the API call let response = rest_client .set_soft_staking(params) .await .context("set_soft_staking request failed")?; info!(?response.rate_limits, "set_soft_staking rate limits"); let data = response.data().await?; info!(?data, "set_soft_staking data"); Ok(()) } examples/staking/rest_api/sol_staking_api/claim_boost_rewards.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::ClaimBoostRewardsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = ClaimBoostRewardsParams::default(); // Make the API call let response = rest_client .claim_boost_rewards(params) .await .context("claim_boost_rewards request failed")?; info!(?response.rate_limits, "claim_boost_rewards rate limits"); let data = response.data().await?; info!(?data, "claim_boost_rewards data"); Ok(()) } examples/staking/rest_api/sol_staking_api/get_bnsol_rate_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetBnsolRateHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetBnsolRateHistoryParams::default(); // Make the API call let response = rest_client .get_bnsol_rate_history(params) .await .context("get_bnsol_rate_history request failed")?; info!(?response.rate_limits, "get_bnsol_rate_history rate limits"); let data = response.data().await?; info!(?data, "get_bnsol_rate_history data"); Ok(()) } examples/staking/rest_api/sol_staking_api/get_bnsol_rewards_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetBnsolRewardsHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetBnsolRewardsHistoryParams::default(); // Make the API call let response = rest_client .get_bnsol_rewards_history(params) .await .context("get_bnsol_rewards_history request failed")?; info!(?response.rate_limits, "get_bnsol_rewards_history rate limits"); let data = response.data().await?; info!(?data, "get_bnsol_rewards_history data"); Ok(()) } examples/staking/rest_api/sol_staking_api/get_boost_rewards_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetBoostRewardsHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetBoostRewardsHistoryParams::builder("CLAIM".to_string()).build()?; // Make the API call let response = rest_client .get_boost_rewards_history(params) .await .context("get_boost_rewards_history request failed")?; info!(?response.rate_limits, "get_boost_rewards_history rate limits"); let data = response.data().await?; info!(?data, "get_boost_rewards_history data"); Ok(()) } examples/staking/rest_api/sol_staking_api/get_sol_redemption_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetSolRedemptionHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetSolRedemptionHistoryParams::default(); // Make the API call let response = rest_client .get_sol_redemption_history(params) .await .context("get_sol_redemption_history request failed")?; info!(?response.rate_limits, "get_sol_redemption_history rate limits"); let data = response.data().await?; info!(?data, "get_sol_redemption_history data"); Ok(()) } examples/staking/rest_api/sol_staking_api/get_sol_staking_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetSolStakingHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetSolStakingHistoryParams::default(); // Make the API call let response = rest_client .get_sol_staking_history(params) .await .context("get_sol_staking_history request failed")?; info!(?response.rate_limits, "get_sol_staking_history rate limits"); let data = response.data().await?; info!(?data, "get_sol_staking_history data"); Ok(()) } examples/staking/rest_api/sol_staking_api/get_sol_staking_quota_details.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetSolStakingQuotaDetailsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetSolStakingQuotaDetailsParams::default(); // Make the API call let response = rest_client .get_sol_staking_quota_details(params) .await .context("get_sol_staking_quota_details request failed")?; info!(?response.rate_limits, "get_sol_staking_quota_details rate limits"); let data = response.data().await?; info!(?data, "get_sol_staking_quota_details data"); Ok(()) } examples/staking/rest_api/sol_staking_api/get_unclaimed_rewards.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::GetUnclaimedRewardsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = GetUnclaimedRewardsParams::default(); // Make the API call let response = rest_client .get_unclaimed_rewards(params) .await .context("get_unclaimed_rewards request failed")?; info!(?response.rate_limits, "get_unclaimed_rewards rate limits"); let data = response.data().await?; info!(?data, "get_unclaimed_rewards data"); Ok(()) } examples/staking/rest_api/sol_staking_api/redeem_sol.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::RedeemSolParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = RedeemSolParams::builder(dec!(1.0)).build()?; // Make the API call let response = rest_client .redeem_sol(params) .await .context("redeem_sol request failed")?; info!(?response.rate_limits, "redeem_sol rate limits"); let data = response.data().await?; info!(?data, "redeem_sol data"); Ok(()) } examples/staking/rest_api/sol_staking_api/sol_staking_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::SolStakingAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = SolStakingAccountParams::default(); // Make the API call let response = rest_client .sol_staking_account(params) .await .context("sol_staking_account request failed")?; info!(?response.rate_limits, "sol_staking_account rate limits"); let data = response.data().await?; info!(?data, "sol_staking_account data"); Ok(()) } examples/staking/rest_api/sol_staking_api/subscribe_sol_staking.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::staking::{StakingRestApi, rest_api::SubscribeSolStakingParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Staking REST API client let rest_client = StakingRestApi::production(rest_conf); // Setup the API parameters let params = SubscribeSolStakingParams::builder(dec!(1.0)).build()?; // Make the API call let response = rest_client .subscribe_sol_staking(params) .await .context("subscribe_sol_staking request failed")?; info!(?response.rate_limits, "subscribe_sol_staking rate limits"); let data = response.data().await?; info!(?data, "subscribe_sol_staking data"); Ok(()) } examples/sub_account/rest_api/account_management_api/create_a_virtual_sub_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::CreateAVirtualSubAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = CreateAVirtualSubAccountParams::builder("sub_account_string_example".to_string()) .build()?; // Make the API call let response = rest_client .create_a_virtual_sub_account(params) .await .context("create_a_virtual_sub_account request failed")?; info!(?response.rate_limits, "create_a_virtual_sub_account rate limits"); let data = response.data().await?; info!(?data, "create_a_virtual_sub_account data"); Ok(()) } examples/sub_account/rest_api/account_management_api/enable_futures_for_sub_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::EnableFuturesForSubAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = EnableFuturesForSubAccountParams::builder("sub-account-email@email.com".to_string()) .build()?; // Make the API call let response = rest_client .enable_futures_for_sub_account(params) .await .context("enable_futures_for_sub_account request failed")?; info!(?response.rate_limits, "enable_futures_for_sub_account rate limits"); let data = response.data().await?; info!(?data, "enable_futures_for_sub_account data"); Ok(()) } examples/sub_account/rest_api/account_management_api/enable_options_for_sub_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::EnableOptionsForSubAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = EnableOptionsForSubAccountParams::builder("sub-account-email@email.com".to_string()) .build()?; // Make the API call let response = rest_client .enable_options_for_sub_account(params) .await .context("enable_options_for_sub_account request failed")?; info!(?response.rate_limits, "enable_options_for_sub_account rate limits"); let data = response.data().await?; info!(?data, "enable_options_for_sub_account data"); Ok(()) } examples/sub_account/rest_api/account_management_api/get_futures_position_risk_of_sub_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetFuturesPositionRiskOfSubAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetFuturesPositionRiskOfSubAccountParams::builder( "sub-account-email@email.com".to_string(), ) .build()?; // Make the API call let response = rest_client .get_futures_position_risk_of_sub_account(params) .await .context("get_futures_position_risk_of_sub_account request failed")?; info!(?response.rate_limits, "get_futures_position_risk_of_sub_account rate limits"); let data = response.data().await?; info!(?data, "get_futures_position_risk_of_sub_account data"); Ok(()) } examples/sub_account/rest_api/account_management_api/get_futures_position_risk_of_sub_account_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetFuturesPositionRiskOfSubAccountV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetFuturesPositionRiskOfSubAccountV2Params::builder( "sub-account-email@email.com".to_string(), 789, ) .build()?; // Make the API call let response = rest_client .get_futures_position_risk_of_sub_account_v2(params) .await .context("get_futures_position_risk_of_sub_account_v2 request failed")?; info!(?response.rate_limits, "get_futures_position_risk_of_sub_account_v2 rate limits"); let data = response.data().await?; info!(?data, "get_futures_position_risk_of_sub_account_v2 data"); Ok(()) } examples/sub_account/rest_api/account_management_api/get_sub_accounts_status_on_margin_or_futures.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetSubAccountsStatusOnMarginOrFuturesParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetSubAccountsStatusOnMarginOrFuturesParams::default(); // Make the API call let response = rest_client .get_sub_accounts_status_on_margin_or_futures(params) .await .context("get_sub_accounts_status_on_margin_or_futures request failed")?; info!(?response.rate_limits, "get_sub_accounts_status_on_margin_or_futures rate limits"); let data = response.data().await?; info!(?data, "get_sub_accounts_status_on_margin_or_futures data"); Ok(()) } examples/sub_account/rest_api/account_management_api/query_sub_account_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::QuerySubAccountListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QuerySubAccountListParams::default(); // Make the API call let response = rest_client .query_sub_account_list(params) .await .context("query_sub_account_list request failed")?; info!(?response.rate_limits, "query_sub_account_list rate limits"); let data = response.data().await?; info!(?data, "query_sub_account_list data"); Ok(()) } examples/sub_account/rest_api/account_management_api/query_sub_account_transaction_statistics.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QuerySubAccountTransactionStatisticsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QuerySubAccountTransactionStatisticsParams::default(); // Make the API call let response = rest_client .query_sub_account_transaction_statistics(params) .await .context("query_sub_account_transaction_statistics request failed")?; info!(?response.rate_limits, "query_sub_account_transaction_statistics rate limits"); let data = response.data().await?; info!(?data, "query_sub_account_transaction_statistics data"); Ok(()) } examples/sub_account/rest_api/api_management_api/add_ip_restriction_for_sub_account_api_key.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::AddIpRestrictionForSubAccountApiKeyParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = AddIpRestrictionForSubAccountApiKeyParams::builder( "sub-account-email@email.com".to_string(), "sub_account_api_key_example".to_string(), "status_example".to_string(), ) .build()?; // Make the API call let response = rest_client .add_ip_restriction_for_sub_account_api_key(params) .await .context("add_ip_restriction_for_sub_account_api_key request failed")?; info!(?response.rate_limits, "add_ip_restriction_for_sub_account_api_key rate limits"); let data = response.data().await?; info!(?data, "add_ip_restriction_for_sub_account_api_key data"); Ok(()) } examples/sub_account/rest_api/api_management_api/delete_ip_list_for_a_sub_account_api_key.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::DeleteIpListForASubAccountApiKeyParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = DeleteIpListForASubAccountApiKeyParams::builder( "sub-account-email@email.com".to_string(), "sub_account_api_key_example".to_string(), "ip_address_example".to_string(), ) .build()?; // Make the API call let response = rest_client .delete_ip_list_for_a_sub_account_api_key(params) .await .context("delete_ip_list_for_a_sub_account_api_key request failed")?; info!(?response.rate_limits, "delete_ip_list_for_a_sub_account_api_key rate limits"); let data = response.data().await?; info!(?data, "delete_ip_list_for_a_sub_account_api_key data"); Ok(()) } examples/sub_account/rest_api/api_management_api/get_ip_restriction_for_a_sub_account_api_key.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetIpRestrictionForASubAccountApiKeyParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetIpRestrictionForASubAccountApiKeyParams::builder( "sub-account-email@email.com".to_string(), "sub_account_api_key_example".to_string(), ) .build()?; // Make the API call let response = rest_client .get_ip_restriction_for_a_sub_account_api_key(params) .await .context("get_ip_restriction_for_a_sub_account_api_key request failed")?; info!(?response.rate_limits, "get_ip_restriction_for_a_sub_account_api_key rate limits"); let data = response.data().await?; info!(?data, "get_ip_restriction_for_a_sub_account_api_key data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/futures_transfer_for_sub_account.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::FuturesTransferForSubAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = FuturesTransferForSubAccountParams::builder( "sub-account-email@email.com".to_string(), "asset_example".to_string(), dec!(1.0), 789, ) .build()?; // Make the API call let response = rest_client .futures_transfer_for_sub_account(params) .await .context("futures_transfer_for_sub_account request failed")?; info!(?response.rate_limits, "futures_transfer_for_sub_account rate limits"); let data = response.data().await?; info!(?data, "futures_transfer_for_sub_account data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/get_detail_on_sub_accounts_futures_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetDetailOnSubAccountsFuturesAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetDetailOnSubAccountsFuturesAccountParams::builder( "sub-account-email@email.com".to_string(), ) .build()?; // Make the API call let response = rest_client .get_detail_on_sub_accounts_futures_account(params) .await .context("get_detail_on_sub_accounts_futures_account request failed")?; info!(?response.rate_limits, "get_detail_on_sub_accounts_futures_account rate limits"); let data = response.data().await?; info!(?data, "get_detail_on_sub_accounts_futures_account data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/get_detail_on_sub_accounts_futures_account_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetDetailOnSubAccountsFuturesAccountV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetDetailOnSubAccountsFuturesAccountV2Params::builder( "sub-account-email@email.com".to_string(), 789, ) .build()?; // Make the API call let response = rest_client .get_detail_on_sub_accounts_futures_account_v2(params) .await .context("get_detail_on_sub_accounts_futures_account_v2 request failed")?; info!(?response.rate_limits, "get_detail_on_sub_accounts_futures_account_v2 rate limits"); let data = response.data().await?; info!(?data, "get_detail_on_sub_accounts_futures_account_v2 data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/get_detail_on_sub_accounts_margin_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetDetailOnSubAccountsMarginAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetDetailOnSubAccountsMarginAccountParams::builder( "sub-account-email@email.com".to_string(), ) .build()?; // Make the API call let response = rest_client .get_detail_on_sub_accounts_margin_account(params) .await .context("get_detail_on_sub_accounts_margin_account request failed")?; info!(?response.rate_limits, "get_detail_on_sub_accounts_margin_account rate limits"); let data = response.data().await?; info!(?data, "get_detail_on_sub_accounts_margin_account data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/get_move_position_history_for_sub_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetMovePositionHistoryForSubAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetMovePositionHistoryForSubAccountParams::builder("symbol_example".to_string(), 789, 789) .build()?; // Make the API call let response = rest_client .get_move_position_history_for_sub_account(params) .await .context("get_move_position_history_for_sub_account request failed")?; info!(?response.rate_limits, "get_move_position_history_for_sub_account rate limits"); let data = response.data().await?; info!(?data, "get_move_position_history_for_sub_account data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/get_sub_account_deposit_address.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::GetSubAccountDepositAddressParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetSubAccountDepositAddressParams::builder( "sub-account-email@email.com".to_string(), "coin_example".to_string(), ) .build()?; // Make the API call let response = rest_client .get_sub_account_deposit_address(params) .await .context("get_sub_account_deposit_address request failed")?; info!(?response.rate_limits, "get_sub_account_deposit_address rate limits"); let data = response.data().await?; info!(?data, "get_sub_account_deposit_address data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/get_sub_account_deposit_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::GetSubAccountDepositHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetSubAccountDepositHistoryParams::builder("sub-account-email@email.com".to_string()) .build()?; // Make the API call let response = rest_client .get_sub_account_deposit_history(params) .await .context("get_sub_account_deposit_history request failed")?; info!(?response.rate_limits, "get_sub_account_deposit_history rate limits"); let data = response.data().await?; info!(?data, "get_sub_account_deposit_history data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/get_summary_of_sub_accounts_futures_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetSummaryOfSubAccountsFuturesAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetSummaryOfSubAccountsFuturesAccountParams::default(); // Make the API call let response = rest_client .get_summary_of_sub_accounts_futures_account(params) .await .context("get_summary_of_sub_accounts_futures_account request failed")?; info!(?response.rate_limits, "get_summary_of_sub_accounts_futures_account rate limits"); let data = response.data().await?; info!(?data, "get_summary_of_sub_accounts_futures_account data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/get_summary_of_sub_accounts_futures_account_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetSummaryOfSubAccountsFuturesAccountV2Params, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetSummaryOfSubAccountsFuturesAccountV2Params::builder(789).build()?; // Make the API call let response = rest_client .get_summary_of_sub_accounts_futures_account_v2(params) .await .context("get_summary_of_sub_accounts_futures_account_v2 request failed")?; info!(?response.rate_limits, "get_summary_of_sub_accounts_futures_account_v2 rate limits"); let data = response.data().await?; info!(?data, "get_summary_of_sub_accounts_futures_account_v2 data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/get_summary_of_sub_accounts_margin_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetSummaryOfSubAccountsMarginAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetSummaryOfSubAccountsMarginAccountParams::default(); // Make the API call let response = rest_client .get_summary_of_sub_accounts_margin_account(params) .await .context("get_summary_of_sub_accounts_margin_account request failed")?; info!(?response.rate_limits, "get_summary_of_sub_accounts_margin_account rate limits"); let data = response.data().await?; info!(?data, "get_summary_of_sub_accounts_margin_account data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/margin_transfer_for_sub_account.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::MarginTransferForSubAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = MarginTransferForSubAccountParams::builder( "sub-account-email@email.com".to_string(), "asset_example".to_string(), dec!(1.0), 789, ) .build()?; // Make the API call let response = rest_client .margin_transfer_for_sub_account(params) .await .context("margin_transfer_for_sub_account request failed")?; info!(?response.rate_limits, "margin_transfer_for_sub_account rate limits"); let data = response.data().await?; info!(?data, "margin_transfer_for_sub_account data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/move_position_for_sub_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::MovePositionForSubAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = MovePositionForSubAccountParams::builder( "from_user_email_example".to_string(), "to_user_email_example".to_string(), "product_type_example".to_string(), vec![], ) .build()?; // Make the API call let response = rest_client .move_position_for_sub_account(params) .await .context("move_position_for_sub_account request failed")?; info!(?response.rate_limits, "move_position_for_sub_account rate limits"); let data = response.data().await?; info!(?data, "move_position_for_sub_account data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/query_sub_account_assets.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::QuerySubAccountAssetsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QuerySubAccountAssetsParams::builder("sub-account-email@email.com".to_string()).build()?; // Make the API call let response = rest_client .query_sub_account_assets(params) .await .context("query_sub_account_assets request failed")?; info!(?response.rate_limits, "query_sub_account_assets rate limits"); let data = response.data().await?; info!(?data, "query_sub_account_assets data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/query_sub_account_assets_asset_management.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QuerySubAccountAssetsAssetManagementParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QuerySubAccountAssetsAssetManagementParams::builder( "sub-account-email@email.com".to_string(), ) .build()?; // Make the API call let response = rest_client .query_sub_account_assets_asset_management(params) .await .context("query_sub_account_assets_asset_management request failed")?; info!(?response.rate_limits, "query_sub_account_assets_asset_management rate limits"); let data = response.data().await?; info!(?data, "query_sub_account_assets_asset_management data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/query_sub_account_futures_asset_transfer_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QuerySubAccountFuturesAssetTransferHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QuerySubAccountFuturesAssetTransferHistoryParams::builder( "sub-account-email@email.com".to_string(), 789, ) .build()?; // Make the API call let response = rest_client .query_sub_account_futures_asset_transfer_history(params) .await .context("query_sub_account_futures_asset_transfer_history request failed")?; info!(?response.rate_limits, "query_sub_account_futures_asset_transfer_history rate limits"); let data = response.data().await?; info!( ?data, "query_sub_account_futures_asset_transfer_history data" ); Ok(()) } examples/sub_account/rest_api/asset_management_api/query_sub_account_spot_asset_transfer_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QuerySubAccountSpotAssetTransferHistoryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QuerySubAccountSpotAssetTransferHistoryParams::default(); // Make the API call let response = rest_client .query_sub_account_spot_asset_transfer_history(params) .await .context("query_sub_account_spot_asset_transfer_history request failed")?; info!(?response.rate_limits, "query_sub_account_spot_asset_transfer_history rate limits"); let data = response.data().await?; info!(?data, "query_sub_account_spot_asset_transfer_history data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/query_sub_account_spot_assets_summary.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QuerySubAccountSpotAssetsSummaryParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QuerySubAccountSpotAssetsSummaryParams::default(); // Make the API call let response = rest_client .query_sub_account_spot_assets_summary(params) .await .context("query_sub_account_spot_assets_summary request failed")?; info!(?response.rate_limits, "query_sub_account_spot_assets_summary rate limits"); let data = response.data().await?; info!(?data, "query_sub_account_spot_assets_summary data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/query_universal_transfer_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::QueryUniversalTransferHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QueryUniversalTransferHistoryParams::default(); // Make the API call let response = rest_client .query_universal_transfer_history(params) .await .context("query_universal_transfer_history request failed")?; info!(?response.rate_limits, "query_universal_transfer_history rate limits"); let data = response.data().await?; info!(?data, "query_universal_transfer_history data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/sub_account_futures_asset_transfer.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::SubAccountFuturesAssetTransferParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = SubAccountFuturesAssetTransferParams::builder( "from_email_example".to_string(), "to_email_example".to_string(), 789, "asset_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .sub_account_futures_asset_transfer(params) .await .context("sub_account_futures_asset_transfer request failed")?; info!(?response.rate_limits, "sub_account_futures_asset_transfer rate limits"); let data = response.data().await?; info!(?data, "sub_account_futures_asset_transfer data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/sub_account_transfer_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::SubAccountTransferHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = SubAccountTransferHistoryParams::default(); // Make the API call let response = rest_client .sub_account_transfer_history(params) .await .context("sub_account_transfer_history request failed")?; info!(?response.rate_limits, "sub_account_transfer_history rate limits"); let data = response.data().await?; info!(?data, "sub_account_transfer_history data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/transfer_to_master.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::TransferToMasterParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = TransferToMasterParams::builder("asset_example".to_string(), dec!(1.0)).build()?; // Make the API call let response = rest_client .transfer_to_master(params) .await .context("transfer_to_master request failed")?; info!(?response.rate_limits, "transfer_to_master rate limits"); let data = response.data().await?; info!(?data, "transfer_to_master data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/transfer_to_sub_account_of_same_master.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::TransferToSubAccountOfSameMasterParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = TransferToSubAccountOfSameMasterParams::builder( "to_email_example".to_string(), "asset_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .transfer_to_sub_account_of_same_master(params) .await .context("transfer_to_sub_account_of_same_master request failed")?; info!(?response.rate_limits, "transfer_to_sub_account_of_same_master rate limits"); let data = response.data().await?; info!(?data, "transfer_to_sub_account_of_same_master data"); Ok(()) } examples/sub_account/rest_api/asset_management_api/universal_transfer.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::UniversalTransferParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = UniversalTransferParams::builder( "from_account_type_example".to_string(), "to_account_type_example".to_string(), "asset_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .universal_transfer(params) .await .context("universal_transfer request failed")?; info!(?response.rate_limits, "universal_transfer rate limits"); let data = response.data().await?; info!(?data, "universal_transfer data"); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/deposit_assets_into_the_managed_sub_account.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::DepositAssetsIntoTheManagedSubAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = DepositAssetsIntoTheManagedSubAccountParams::builder( "to_email_example".to_string(), "asset_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .deposit_assets_into_the_managed_sub_account(params) .await .context("deposit_assets_into_the_managed_sub_account request failed")?; info!(?response.rate_limits, "deposit_assets_into_the_managed_sub_account rate limits"); let data = response.data().await?; info!(?data, "deposit_assets_into_the_managed_sub_account data"); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/get_managed_sub_account_deposit_address.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::GetManagedSubAccountDepositAddressParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = GetManagedSubAccountDepositAddressParams::builder( "sub-account-email@email.com".to_string(), "coin_example".to_string(), ) .build()?; // Make the API call let response = rest_client .get_managed_sub_account_deposit_address(params) .await .context("get_managed_sub_account_deposit_address request failed")?; info!(?response.rate_limits, "get_managed_sub_account_deposit_address rate limits"); let data = response.data().await?; info!(?data, "get_managed_sub_account_deposit_address data"); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/query_managed_sub_account_asset_details.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QueryManagedSubAccountAssetDetailsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QueryManagedSubAccountAssetDetailsParams::builder( "sub-account-email@email.com".to_string(), ) .build()?; // Make the API call let response = rest_client .query_managed_sub_account_asset_details(params) .await .context("query_managed_sub_account_asset_details request failed")?; info!(?response.rate_limits, "query_managed_sub_account_asset_details rate limits"); let data = response.data().await?; info!(?data, "query_managed_sub_account_asset_details data"); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/query_managed_sub_account_futures_asset_details.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QueryManagedSubAccountFuturesAssetDetailsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QueryManagedSubAccountFuturesAssetDetailsParams::builder( "sub-account-email@email.com".to_string(), ) .build()?; // Make the API call let response = rest_client .query_managed_sub_account_futures_asset_details(params) .await .context("query_managed_sub_account_futures_asset_details request failed")?; info!(?response.rate_limits, "query_managed_sub_account_futures_asset_details rate limits"); let data = response.data().await?; info!( ?data, "query_managed_sub_account_futures_asset_details data" ); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/query_managed_sub_account_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::QueryManagedSubAccountListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QueryManagedSubAccountListParams::default(); // Make the API call let response = rest_client .query_managed_sub_account_list(params) .await .context("query_managed_sub_account_list request failed")?; info!(?response.rate_limits, "query_managed_sub_account_list rate limits"); let data = response.data().await?; info!(?data, "query_managed_sub_account_list data"); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/query_managed_sub_account_margin_asset_details.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QueryManagedSubAccountMarginAssetDetailsParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QueryManagedSubAccountMarginAssetDetailsParams::builder( "sub-account-email@email.com".to_string(), ) .build()?; // Make the API call let response = rest_client .query_managed_sub_account_margin_asset_details(params) .await .context("query_managed_sub_account_margin_asset_details request failed")?; info!(?response.rate_limits, "query_managed_sub_account_margin_asset_details rate limits"); let data = response.data().await?; info!(?data, "query_managed_sub_account_margin_asset_details data"); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/query_managed_sub_account_snapshot.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{SubAccountRestApi, rest_api::QueryManagedSubAccountSnapshotParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QueryManagedSubAccountSnapshotParams::builder( "sub-account-email@email.com".to_string(), "r#type_example".to_string(), ) .build()?; // Make the API call let response = rest_client .query_managed_sub_account_snapshot(params) .await .context("query_managed_sub_account_snapshot request failed")?; info!(?response.rate_limits, "query_managed_sub_account_snapshot rate limits"); let data = response.data().await?; info!(?data, "query_managed_sub_account_snapshot data"); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/query_managed_sub_account_transfer_log_master_account_investor.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QueryManagedSubAccountTransferLogMasterAccountInvestorParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QueryManagedSubAccountTransferLogMasterAccountInvestorParams::builder( "sub-account-email@email.com".to_string(), 1623319461670, 1641782889000, 789, 789, ) .build()?; // Make the API call let response = rest_client .query_managed_sub_account_transfer_log_master_account_investor(params) .await .context("query_managed_sub_account_transfer_log_master_account_investor request failed")?; info!(?response.rate_limits, "query_managed_sub_account_transfer_log_master_account_investor rate limits"); let data = response.data().await?; info!( ?data, "query_managed_sub_account_transfer_log_master_account_investor data" ); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/query_managed_sub_account_transfer_log_master_account_trading.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QueryManagedSubAccountTransferLogMasterAccountTradingParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QueryManagedSubAccountTransferLogMasterAccountTradingParams::builder( "sub-account-email@email.com".to_string(), 1623319461670, 1641782889000, 789, 789, ) .build()?; // Make the API call let response = rest_client .query_managed_sub_account_transfer_log_master_account_trading(params) .await .context("query_managed_sub_account_transfer_log_master_account_trading request failed")?; info!(?response.rate_limits, "query_managed_sub_account_transfer_log_master_account_trading rate limits"); let data = response.data().await?; info!( ?data, "query_managed_sub_account_transfer_log_master_account_trading data" ); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/query_managed_sub_account_transfer_log_sub_account_trading.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::QueryManagedSubAccountTransferLogSubAccountTradingParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = QueryManagedSubAccountTransferLogSubAccountTradingParams::builder( 1623319461670, 1641782889000, 789, 789, ) .build()?; // Make the API call let response = rest_client .query_managed_sub_account_transfer_log_sub_account_trading(params) .await .context("query_managed_sub_account_transfer_log_sub_account_trading request failed")?; info!(?response.rate_limits, "query_managed_sub_account_transfer_log_sub_account_trading rate limits"); let data = response.data().await?; info!( ?data, "query_managed_sub_account_transfer_log_sub_account_trading data" ); Ok(()) } examples/sub_account/rest_api/managed_sub_account_api/withdrawl_assets_from_the_managed_sub_account.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::sub_account::{ SubAccountRestApi, rest_api::WithdrawlAssetsFromTheManagedSubAccountParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the SubAccount REST API client let rest_client = SubAccountRestApi::production(rest_conf); // Setup the API parameters let params = WithdrawlAssetsFromTheManagedSubAccountParams::builder( "from_email_example".to_string(), "asset_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .withdrawl_assets_from_the_managed_sub_account(params) .await .context("withdrawl_assets_from_the_managed_sub_account request failed")?; info!(?response.rate_limits, "withdrawl_assets_from_the_managed_sub_account rate limits"); let data = response.data().await?; info!(?data, "withdrawl_assets_from_the_managed_sub_account data"); Ok(()) } examples/vip_loan/rest_api/market_data_api/get_borrow_interest_rate.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::vip_loan::{VIPLoanRestApi, rest_api::GetBorrowInterestRateParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the VIPLoan REST API client let rest_client = VIPLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetBorrowInterestRateParams::builder("loan_coin_example".to_string()).build()?; // Make the API call let response = rest_client .get_borrow_interest_rate(params) .await .context("get_borrow_interest_rate request failed")?; info!(?response.rate_limits, "get_borrow_interest_rate rate limits"); let data = response.data().await?; info!(?data, "get_borrow_interest_rate data"); Ok(()) } examples/vip_loan/rest_api/market_data_api/get_collateral_asset_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::vip_loan::{VIPLoanRestApi, rest_api::GetCollateralAssetDataParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the VIPLoan REST API client let rest_client = VIPLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetCollateralAssetDataParams::default(); // Make the API call let response = rest_client .get_collateral_asset_data(params) .await .context("get_collateral_asset_data request failed")?; info!(?response.rate_limits, "get_collateral_asset_data rate limits"); let data = response.data().await?; info!(?data, "get_collateral_asset_data data"); Ok(()) } examples/vip_loan/rest_api/market_data_api/get_loanable_assets_data.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::vip_loan::{VIPLoanRestApi, rest_api::GetLoanableAssetsDataParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the VIPLoan REST API client let rest_client = VIPLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetLoanableAssetsDataParams::default(); // Make the API call let response = rest_client .get_loanable_assets_data(params) .await .context("get_loanable_assets_data request failed")?; info!(?response.rate_limits, "get_loanable_assets_data rate limits"); let data = response.data().await?; info!(?data, "get_loanable_assets_data data"); Ok(()) } examples/vip_loan/rest_api/trade_api/vip_loan_borrow.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::vip_loan::{VIPLoanRestApi, rest_api::VipLoanBorrowParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the VIPLoan REST API client let rest_client = VIPLoanRestApi::production(rest_conf); // Setup the API parameters let params = VipLoanBorrowParams::builder( 1, "loan_coin_example".to_string(), dec!(1.0), "1".to_string(), "collateral_coin_example".to_string(), true, ) .build()?; // Make the API call let response = rest_client .vip_loan_borrow(params) .await .context("vip_loan_borrow request failed")?; info!(?response.rate_limits, "vip_loan_borrow rate limits"); let data = response.data().await?; info!(?data, "vip_loan_borrow data"); Ok(()) } examples/vip_loan/rest_api/trade_api/vip_loan_renew.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::vip_loan::{VIPLoanRestApi, rest_api::VipLoanRenewParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the VIPLoan REST API client let rest_client = VIPLoanRestApi::production(rest_conf); // Setup the API parameters let params = VipLoanRenewParams::builder(1, 789).build()?; // Make the API call let response = rest_client .vip_loan_renew(params) .await .context("vip_loan_renew request failed")?; info!(?response.rate_limits, "vip_loan_renew rate limits"); let data = response.data().await?; info!(?data, "vip_loan_renew data"); Ok(()) } examples/vip_loan/rest_api/trade_api/vip_loan_repay.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::vip_loan::{VIPLoanRestApi, rest_api::VipLoanRepayParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the VIPLoan REST API client let rest_client = VIPLoanRestApi::production(rest_conf); // Setup the API parameters let params = VipLoanRepayParams::builder(1, dec!(1.0)).build()?; // Make the API call let response = rest_client .vip_loan_repay(params) .await .context("vip_loan_repay request failed")?; info!(?response.rate_limits, "vip_loan_repay rate limits"); let data = response.data().await?; info!(?data, "vip_loan_repay data"); Ok(()) } examples/vip_loan/rest_api/user_information_api/check_vip_loan_collateral_account.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::vip_loan::{VIPLoanRestApi, rest_api::CheckVipLoanCollateralAccountParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the VIPLoan REST API client let rest_client = VIPLoanRestApi::production(rest_conf); // Setup the API parameters let params = CheckVipLoanCollateralAccountParams::default(); // Make the API call let response = rest_client .check_vip_loan_collateral_account(params) .await .context("check_vip_loan_collateral_account request failed")?; info!(?response.rate_limits, "check_vip_loan_collateral_account rate limits"); let data = response.data().await?; info!(?data, "check_vip_loan_collateral_account data"); Ok(()) } examples/vip_loan/rest_api/user_information_api/get_vip_loan_ongoing_orders.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::vip_loan::{VIPLoanRestApi, rest_api::GetVipLoanOngoingOrdersParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the VIPLoan REST API client let rest_client = VIPLoanRestApi::production(rest_conf); // Setup the API parameters let params = GetVipLoanOngoingOrdersParams::default(); // Make the API call let response = rest_client .get_vip_loan_ongoing_orders(params) .await .context("get_vip_loan_ongoing_orders request failed")?; info!(?response.rate_limits, "get_vip_loan_ongoing_orders rate limits"); let data = response.data().await?; info!(?data, "get_vip_loan_ongoing_orders data"); Ok(()) } examples/vip_loan/rest_api/user_information_api/query_application_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::vip_loan::{VIPLoanRestApi, rest_api::QueryApplicationStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the VIPLoan REST API client let rest_client = VIPLoanRestApi::production(rest_conf); // Setup the API parameters let params = QueryApplicationStatusParams::default(); // Make the API call let response = rest_client .query_application_status(params) .await .context("query_application_status request failed")?; info!(?response.rate_limits, "query_application_status rate limits"); let data = response.data().await?; info!(?data, "query_application_status data"); Ok(()) } examples/wallet/rest_api/account_api/account_api_trading_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::AccountApiTradingStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = AccountApiTradingStatusParams::default(); // Make the API call let response = rest_client .account_api_trading_status(params) .await .context("account_api_trading_status request failed")?; info!(?response.rate_limits, "account_api_trading_status rate limits"); let data = response.data().await?; info!(?data, "account_api_trading_status data"); Ok(()) } examples/wallet/rest_api/account_api/account_info.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::AccountInfoParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = AccountInfoParams::default(); // Make the API call let response = rest_client .account_info(params) .await .context("account_info request failed")?; info!(?response.rate_limits, "account_info rate limits"); let data = response.data().await?; info!(?data, "account_info data"); Ok(()) } examples/wallet/rest_api/account_api/account_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::AccountStatusParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = AccountStatusParams::default(); // Make the API call let response = rest_client .account_status(params) .await .context("account_status request failed")?; info!(?response.rate_limits, "account_status rate limits"); let data = response.data().await?; info!(?data, "account_status data"); Ok(()) } examples/wallet/rest_api/account_api/daily_account_snapshot.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::DailyAccountSnapshotParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = DailyAccountSnapshotParams::builder("r#type_example".to_string()).build()?; // Make the API call let response = rest_client .daily_account_snapshot(params) .await .context("daily_account_snapshot request failed")?; info!(?response.rate_limits, "daily_account_snapshot rate limits"); let data = response.data().await?; info!(?data, "daily_account_snapshot data"); Ok(()) } examples/wallet/rest_api/account_api/disable_fast_withdraw_switch.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::DisableFastWithdrawSwitchParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = DisableFastWithdrawSwitchParams::default(); // Make the API call let response = rest_client .disable_fast_withdraw_switch(params) .await .context("disable_fast_withdraw_switch request failed")?; info!(?response.rate_limits, "disable_fast_withdraw_switch rate limits"); let data = response.data().await?; info!(?data, "disable_fast_withdraw_switch data"); Ok(()) } examples/wallet/rest_api/account_api/enable_fast_withdraw_switch.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::EnableFastWithdrawSwitchParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = EnableFastWithdrawSwitchParams::default(); // Make the API call let response = rest_client .enable_fast_withdraw_switch(params) .await .context("enable_fast_withdraw_switch request failed")?; info!(?response.rate_limits, "enable_fast_withdraw_switch rate limits"); let data = response.data().await?; info!(?data, "enable_fast_withdraw_switch data"); Ok(()) } examples/wallet/rest_api/account_api/get_api_key_permission.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::GetApiKeyPermissionParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = GetApiKeyPermissionParams::default(); // Make the API call let response = rest_client .get_api_key_permission(params) .await .context("get_api_key_permission request failed")?; info!(?response.rate_limits, "get_api_key_permission rate limits"); let data = response.data().await?; info!(?data, "get_api_key_permission data"); Ok(()) } examples/wallet/rest_api/asset_api/asset_detail.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::AssetDetailParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = AssetDetailParams::default(); // Make the API call let response = rest_client .asset_detail(params) .await .context("asset_detail request failed")?; info!(?response.rate_limits, "asset_detail rate limits"); let data = response.data().await?; info!(?data, "asset_detail data"); Ok(()) } examples/wallet/rest_api/asset_api/asset_dividend_record.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::AssetDividendRecordParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = AssetDividendRecordParams::default(); // Make the API call let response = rest_client .asset_dividend_record(params) .await .context("asset_dividend_record request failed")?; info!(?response.rate_limits, "asset_dividend_record rate limits"); let data = response.data().await?; info!(?data, "asset_dividend_record data"); Ok(()) } examples/wallet/rest_api/asset_api/dust_transfer.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::DustTransferParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = DustTransferParams::builder("asset_example".to_string()).build()?; // Make the API call let response = rest_client .dust_transfer(params) .await .context("dust_transfer request failed")?; info!(?response.rate_limits, "dust_transfer rate limits"); let data = response.data().await?; info!(?data, "dust_transfer data"); Ok(()) } examples/wallet/rest_api/asset_api/dustlog.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::DustlogParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = DustlogParams::default(); // Make the API call let response = rest_client .dustlog(params) .await .context("dustlog request failed")?; info!(?response.rate_limits, "dustlog rate limits"); let data = response.data().await?; info!(?data, "dustlog data"); Ok(()) } examples/wallet/rest_api/asset_api/funding_wallet.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::FundingWalletParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = FundingWalletParams::default(); // Make the API call let response = rest_client .funding_wallet(params) .await .context("funding_wallet request failed")?; info!(?response.rate_limits, "funding_wallet rate limits"); let data = response.data().await?; info!(?data, "funding_wallet data"); Ok(()) } examples/wallet/rest_api/asset_api/get_assets_that_can_be_converted_into_bnb.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::GetAssetsThatCanBeConvertedIntoBnbParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = GetAssetsThatCanBeConvertedIntoBnbParams::default(); // Make the API call let response = rest_client .get_assets_that_can_be_converted_into_bnb(params) .await .context("get_assets_that_can_be_converted_into_bnb request failed")?; info!(?response.rate_limits, "get_assets_that_can_be_converted_into_bnb rate limits"); let data = response.data().await?; info!(?data, "get_assets_that_can_be_converted_into_bnb data"); Ok(()) } examples/wallet/rest_api/asset_api/get_cloud_mining_payment_and_refund_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::GetCloudMiningPaymentAndRefundHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = GetCloudMiningPaymentAndRefundHistoryParams::builder(1623319461670, 1641782889000) .build()?; // Make the API call let response = rest_client .get_cloud_mining_payment_and_refund_history(params) .await .context("get_cloud_mining_payment_and_refund_history request failed")?; info!(?response.rate_limits, "get_cloud_mining_payment_and_refund_history rate limits"); let data = response.data().await?; info!(?data, "get_cloud_mining_payment_and_refund_history data"); Ok(()) } examples/wallet/rest_api/asset_api/get_open_symbol_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::WalletRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Make the API call let response = rest_client .get_open_symbol_list() .await .context("get_open_symbol_list request failed")?; info!(?response.rate_limits, "get_open_symbol_list rate limits"); let data = response.data().await?; info!(?data, "get_open_symbol_list data"); Ok(()) } examples/wallet/rest_api/asset_api/query_user_delegation_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::QueryUserDelegationHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = QueryUserDelegationHistoryParams::builder( "email_example".to_string(), 1623319461670, 1641782889000, ) .build()?; // Make the API call let response = rest_client .query_user_delegation_history(params) .await .context("query_user_delegation_history request failed")?; info!(?response.rate_limits, "query_user_delegation_history rate limits"); let data = response.data().await?; info!(?data, "query_user_delegation_history data"); Ok(()) } examples/wallet/rest_api/asset_api/query_user_universal_transfer_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::QueryUserUniversalTransferHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = QueryUserUniversalTransferHistoryParams::builder("r#type_example".to_string()).build()?; // Make the API call let response = rest_client .query_user_universal_transfer_history(params) .await .context("query_user_universal_transfer_history request failed")?; info!(?response.rate_limits, "query_user_universal_transfer_history rate limits"); let data = response.data().await?; info!(?data, "query_user_universal_transfer_history data"); Ok(()) } examples/wallet/rest_api/asset_api/query_user_wallet_balance.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::QueryUserWalletBalanceParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = QueryUserWalletBalanceParams::default(); // Make the API call let response = rest_client .query_user_wallet_balance(params) .await .context("query_user_wallet_balance request failed")?; info!(?response.rate_limits, "query_user_wallet_balance rate limits"); let data = response.data().await?; info!(?data, "query_user_wallet_balance data"); Ok(()) } examples/wallet/rest_api/asset_api/toggle_bnb_burn_on_spot_trade_and_margin_interest.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{ WalletRestApi, rest_api::ToggleBnbBurnOnSpotTradeAndMarginInterestParams, }; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = ToggleBnbBurnOnSpotTradeAndMarginInterestParams::default(); // Make the API call let response = rest_client .toggle_bnb_burn_on_spot_trade_and_margin_interest(params) .await .context("toggle_bnb_burn_on_spot_trade_and_margin_interest request failed")?; info!(?response.rate_limits, "toggle_bnb_burn_on_spot_trade_and_margin_interest rate limits"); let data = response.data().await?; info!( ?data, "toggle_bnb_burn_on_spot_trade_and_margin_interest data" ); Ok(()) } examples/wallet/rest_api/asset_api/trade_fee.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::TradeFeeParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = TradeFeeParams::default(); // Make the API call let response = rest_client .trade_fee(params) .await .context("trade_fee request failed")?; info!(?response.rate_limits, "trade_fee rate limits"); let data = response.data().await?; info!(?data, "trade_fee data"); Ok(()) } examples/wallet/rest_api/asset_api/user_asset.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::UserAssetParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = UserAssetParams::default(); // Make the API call let response = rest_client .user_asset(params) .await .context("user_asset request failed")?; info!(?response.rate_limits, "user_asset rate limits"); let data = response.data().await?; info!(?data, "user_asset data"); Ok(()) } examples/wallet/rest_api/asset_api/user_universal_transfer.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::UserUniversalTransferParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = UserUniversalTransferParams::builder( "r#type_example".to_string(), "asset_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .user_universal_transfer(params) .await .context("user_universal_transfer request failed")?; info!(?response.rate_limits, "user_universal_transfer rate limits"); let data = response.data().await?; info!(?data, "user_universal_transfer data"); Ok(()) } examples/wallet/rest_api/capital_api/all_coins_information.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::AllCoinsInformationParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = AllCoinsInformationParams::default(); // Make the API call let response = rest_client .all_coins_information(params) .await .context("all_coins_information request failed")?; info!(?response.rate_limits, "all_coins_information rate limits"); let data = response.data().await?; info!(?data, "all_coins_information data"); Ok(()) } examples/wallet/rest_api/capital_api/deposit_address.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::DepositAddressParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = DepositAddressParams::builder("coin_example".to_string()).build()?; // Make the API call let response = rest_client .deposit_address(params) .await .context("deposit_address request failed")?; info!(?response.rate_limits, "deposit_address rate limits"); let data = response.data().await?; info!(?data, "deposit_address data"); Ok(()) } examples/wallet/rest_api/capital_api/deposit_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::DepositHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = DepositHistoryParams::default(); // Make the API call let response = rest_client .deposit_history(params) .await .context("deposit_history request failed")?; info!(?response.rate_limits, "deposit_history rate limits"); let data = response.data().await?; info!(?data, "deposit_history data"); Ok(()) } examples/wallet/rest_api/capital_api/fetch_deposit_address_list_with_network.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::FetchDepositAddressListWithNetworkParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = FetchDepositAddressListWithNetworkParams::builder("coin_example".to_string()).build()?; // Make the API call let response = rest_client .fetch_deposit_address_list_with_network(params) .await .context("fetch_deposit_address_list_with_network request failed")?; info!(?response.rate_limits, "fetch_deposit_address_list_with_network rate limits"); let data = response.data().await?; info!(?data, "fetch_deposit_address_list_with_network data"); Ok(()) } examples/wallet/rest_api/capital_api/fetch_withdraw_address_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::WalletRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Make the API call let response = rest_client .fetch_withdraw_address_list() .await .context("fetch_withdraw_address_list request failed")?; info!(?response.rate_limits, "fetch_withdraw_address_list rate limits"); let data = response.data().await?; info!(?data, "fetch_withdraw_address_list data"); Ok(()) } examples/wallet/rest_api/capital_api/fetch_withdraw_quota.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::WalletRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Make the API call let response = rest_client .fetch_withdraw_quota() .await .context("fetch_withdraw_quota request failed")?; info!(?response.rate_limits, "fetch_withdraw_quota rate limits"); let data = response.data().await?; info!(?data, "fetch_withdraw_quota data"); Ok(()) } examples/wallet/rest_api/capital_api/one_click_arrival_deposit_apply.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::OneClickArrivalDepositApplyParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = OneClickArrivalDepositApplyParams::default(); // Make the API call let response = rest_client .one_click_arrival_deposit_apply(params) .await .context("one_click_arrival_deposit_apply request failed")?; info!(?response.rate_limits, "one_click_arrival_deposit_apply rate limits"); let data = response.data().await?; info!(?data, "one_click_arrival_deposit_apply data"); Ok(()) } examples/wallet/rest_api/capital_api/withdraw.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::WithdrawParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = WithdrawParams::builder( "coin_example".to_string(), "address_example".to_string(), dec!(1.0), ) .build()?; // Make the API call let response = rest_client .withdraw(params) .await .context("withdraw request failed")?; info!(?response.rate_limits, "withdraw rate limits"); let data = response.data().await?; info!(?data, "withdraw data"); Ok(()) } examples/wallet/rest_api/capital_api/withdraw_history.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::WithdrawHistoryParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = WithdrawHistoryParams::default(); // Make the API call let response = rest_client .withdraw_history(params) .await .context("withdraw_history request failed")?; info!(?response.rate_limits, "withdraw_history rate limits"); let data = response.data().await?; info!(?data, "withdraw_history data"); Ok(()) } examples/wallet/rest_api/others_api/get_symbols_delist_schedule_for_spot.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::GetSymbolsDelistScheduleForSpotParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = GetSymbolsDelistScheduleForSpotParams::default(); // Make the API call let response = rest_client .get_symbols_delist_schedule_for_spot(params) .await .context("get_symbols_delist_schedule_for_spot request failed")?; info!(?response.rate_limits, "get_symbols_delist_schedule_for_spot rate limits"); let data = response.data().await?; info!(?data, "get_symbols_delist_schedule_for_spot data"); Ok(()) } examples/wallet/rest_api/others_api/system_status.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::WalletRestApi; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Make the API call let response = rest_client .system_status() .await .context("system_status request failed")?; info!(?response.rate_limits, "system_status rate limits"); let data = response.data().await?; info!(?data, "system_status data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/broker_withdraw.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::BrokerWithdrawParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = BrokerWithdrawParams::builder( "address_example".to_string(), "coin_example".to_string(), dec!(1.0), "1".to_string(), "questionnaire_example".to_string(), "originator_pii_example".to_string(), "signature_example".to_string(), ) .build()?; // Make the API call let response = rest_client .broker_withdraw(params) .await .context("broker_withdraw request failed")?; info!(?response.rate_limits, "broker_withdraw rate limits"); let data = response.data().await?; info!(?data, "broker_withdraw data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/check_questionnaire_requirements.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::CheckQuestionnaireRequirementsParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = CheckQuestionnaireRequirementsParams::default(); // Make the API call let response = rest_client .check_questionnaire_requirements(params) .await .context("check_questionnaire_requirements request failed")?; info!(?response.rate_limits, "check_questionnaire_requirements rate limits"); let data = response.data().await?; info!(?data, "check_questionnaire_requirements data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/deposit_history_travel_rule.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::DepositHistoryTravelRuleParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = DepositHistoryTravelRuleParams::default(); // Make the API call let response = rest_client .deposit_history_travel_rule(params) .await .context("deposit_history_travel_rule request failed")?; info!(?response.rate_limits, "deposit_history_travel_rule rate limits"); let data = response.data().await?; info!(?data, "deposit_history_travel_rule data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/deposit_history_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::DepositHistoryV2Params}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = DepositHistoryV2Params::default(); // Make the API call let response = rest_client .deposit_history_v2(params) .await .context("deposit_history_v2 request failed")?; info!(?response.rate_limits, "deposit_history_v2 rate limits"); let data = response.data().await?; info!(?data, "deposit_history_v2 data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/fetch_address_verification_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::FetchAddressVerificationListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = FetchAddressVerificationListParams::default(); // Make the API call let response = rest_client .fetch_address_verification_list(params) .await .context("fetch_address_verification_list request failed")?; info!(?response.rate_limits, "fetch_address_verification_list rate limits"); let data = response.data().await?; info!(?data, "fetch_address_verification_list data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/submit_deposit_questionnaire.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::SubmitDepositQuestionnaireParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = SubmitDepositQuestionnaireParams::builder( "1".to_string(), "1".to_string(), "questionnaire_example".to_string(), "beneficiary_pii_example".to_string(), "signature_example".to_string(), ) .build()?; // Make the API call let response = rest_client .submit_deposit_questionnaire(params) .await .context("submit_deposit_questionnaire request failed")?; info!(?response.rate_limits, "submit_deposit_questionnaire rate limits"); let data = response.data().await?; info!(?data, "submit_deposit_questionnaire data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/submit_deposit_questionnaire_travel_rule.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::SubmitDepositQuestionnaireTravelRuleParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = SubmitDepositQuestionnaireTravelRuleParams::builder(1, "questionnaire_example".to_string()) .build()?; // Make the API call let response = rest_client .submit_deposit_questionnaire_travel_rule(params) .await .context("submit_deposit_questionnaire_travel_rule request failed")?; info!(?response.rate_limits, "submit_deposit_questionnaire_travel_rule rate limits"); let data = response.data().await?; info!(?data, "submit_deposit_questionnaire_travel_rule data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/vasp_list.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::VaspListParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = VaspListParams::default(); // Make the API call let response = rest_client .vasp_list(params) .await .context("vasp_list request failed")?; info!(?response.rate_limits, "vasp_list rate limits"); let data = response.data().await?; info!(?data, "vasp_list data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/withdraw_history_v1.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::WithdrawHistoryV1Params}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = WithdrawHistoryV1Params::default(); // Make the API call let response = rest_client .withdraw_history_v1(params) .await .context("withdraw_history_v1 request failed")?; info!(?response.rate_limits, "withdraw_history_v1 rate limits"); let data = response.data().await?; info!(?data, "withdraw_history_v1 data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/withdraw_history_v2.rs use anyhow::{Context, Result}; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::WithdrawHistoryV2Params}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = WithdrawHistoryV2Params::default(); // Make the API call let response = rest_client .withdraw_history_v2(params) .await .context("withdraw_history_v2 request failed")?; info!(?response.rate_limits, "withdraw_history_v2 rate limits"); let data = response.data().await?; info!(?data, "withdraw_history_v2 data"); Ok(()) } examples/wallet/rest_api/travel_rule_api/withdraw_travel_rule.rs use anyhow::{Context, Result}; use rust_decimal::prelude::*; use std::env; use tracing::info; use binance_sdk::config::ConfigurationRestApi; use binance_sdk::wallet::{WalletRestApi, rest_api::WithdrawTravelRuleParams}; #[tokio::main] async fn main() -> Result<()> { // Load credentials from env let api_key = env::var("API_KEY").context("API_KEY must be set")?; let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?; // Build REST config let rest_conf = ConfigurationRestApi::builder() .api_key(api_key) .api_secret(api_secret) .build()?; // Create the Wallet REST API client let rest_client = WalletRestApi::production(rest_conf); // Setup the API parameters let params = WithdrawTravelRuleParams::builder( "coin_example".to_string(), "address_example".to_string(), dec!(1.0), "questionnaire_example".to_string(), ) .build()?; // Make the API call let response = rest_client .withdraw_travel_rule(params) .await .context("withdraw_travel_rule request failed")?; info!(?response.rate_limits, "withdraw_travel_rule rate limits"); let data = response.data().await?; info!(?data, "withdraw_travel_rule data"); Ok(()) } rustfmt.toml edition = "2024" max_width = 100 hard_tabs = false tab_spaces = 4 newline_style = "Unix" use_small_heuristics = "Default" reorder_imports = true src/algo/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::algo; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = algo::AlgoRestApi::production(configuration); let params = algo::rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams::default(); let response = client.query_historical_algo_orders_spot_algo(params).await?; ``` src/algo/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::algo; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = algo::AlgoRestApi::production(configuration); let params = algo::rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams::default(); let response = client.query_historical_algo_orders_spot_algo(params).await?; ``` src/algo/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::algo; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = algo::AlgoRestApi::production(configuration); let params = algo::rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams::default(); match client.query_historical_algo_orders_spot_algo(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/algo/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::algo; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = algo::AlgoRestApi::production(configuration); let params = algo::rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams::default(); let response = client.query_historical_algo_orders_spot_algo(params).await?; ``` src/algo/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::algo; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = algo::AlgoRestApi::production(configuration); let params = algo::rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams::default(); let response = client.query_historical_algo_orders_spot_algo(params).await?; ``` src/algo/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::algo; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = algo::AlgoRestApi::production(configuration); let params = algo::rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams::default(); let response = client.query_historical_algo_orders_spot_algo(params).await?; ``` src/algo/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::algo; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = algo::AlgoRestApi::production(configuration); let params = algo::rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams::default(); let response = client.query_historical_algo_orders_spot_algo(params).await?; ``` src/algo/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::algo; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = algo::AlgoRestApi::production(configuration); let params = algo::rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams::default(); let response = client.query_historical_algo_orders_spot_algo(params).await?; ``` src/algo/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::algo; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = algo::AlgoRestApi::production(configuration); let params = algo::rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams::default(); let response = client.query_historical_algo_orders_spot_algo(params).await?; ``` src/algo/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::ALGO_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the Algo REST API client for interacting with the Binance Algo REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct AlgoRestApi {} impl AlgoRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production Algo REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("algo"); if config.base_path.is_none() { config.base_path = Some(ALGO_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(ALGO_REST_API_PROD_URL.to_string()); AlgoRestApi::from_config(config) } } src/algo/rest_api/apis/mod.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod future_algo_api; pub use future_algo_api::*; pub mod spot_algo_api; pub use spot_algo_api::*; src/algo/rest_api/models/cancel_algo_order_future_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAlgoOrderFutureAlgoResponse { #[serde(rename = "algoId", skip_serializing_if = "Option::is_none")] pub algo_id: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAlgoOrderFutureAlgoResponse { #[must_use] pub fn new() -> CancelAlgoOrderFutureAlgoResponse { CancelAlgoOrderFutureAlgoResponse { algo_id: None, success: None, code: None, msg: None, } } } src/algo/rest_api/models/cancel_algo_order_spot_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAlgoOrderSpotAlgoResponse { #[serde(rename = "algoId", skip_serializing_if = "Option::is_none")] pub algo_id: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAlgoOrderSpotAlgoResponse { #[must_use] pub fn new() -> CancelAlgoOrderSpotAlgoResponse { CancelAlgoOrderSpotAlgoResponse { algo_id: None, success: None, code: None, msg: None, } } } src/algo/rest_api/models/mod.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod cancel_algo_order_future_algo_response; pub use self::cancel_algo_order_future_algo_response::CancelAlgoOrderFutureAlgoResponse; pub mod cancel_algo_order_spot_algo_response; pub use self::cancel_algo_order_spot_algo_response::CancelAlgoOrderSpotAlgoResponse; pub mod query_current_algo_open_orders_future_algo_response; pub use self::query_current_algo_open_orders_future_algo_response::QueryCurrentAlgoOpenOrdersFutureAlgoResponse; pub mod query_current_algo_open_orders_future_algo_response_orders_inner; pub use self::query_current_algo_open_orders_future_algo_response_orders_inner::QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner; pub mod query_current_algo_open_orders_spot_algo_response; pub use self::query_current_algo_open_orders_spot_algo_response::QueryCurrentAlgoOpenOrdersSpotAlgoResponse; pub mod query_current_algo_open_orders_spot_algo_response_orders_inner; pub use self::query_current_algo_open_orders_spot_algo_response_orders_inner::QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner; pub mod query_historical_algo_orders_future_algo_response; pub use self::query_historical_algo_orders_future_algo_response::QueryHistoricalAlgoOrdersFutureAlgoResponse; pub mod query_historical_algo_orders_future_algo_response_orders_inner; pub use self::query_historical_algo_orders_future_algo_response_orders_inner::QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner; pub mod query_historical_algo_orders_spot_algo_response; pub use self::query_historical_algo_orders_spot_algo_response::QueryHistoricalAlgoOrdersSpotAlgoResponse; pub mod query_historical_algo_orders_spot_algo_response_orders_inner; pub use self::query_historical_algo_orders_spot_algo_response_orders_inner::QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner; pub mod query_sub_orders_future_algo_response; pub use self::query_sub_orders_future_algo_response::QuerySubOrdersFutureAlgoResponse; pub mod query_sub_orders_future_algo_response_sub_orders_inner; pub use self::query_sub_orders_future_algo_response_sub_orders_inner::QuerySubOrdersFutureAlgoResponseSubOrdersInner; pub mod query_sub_orders_spot_algo_response; pub use self::query_sub_orders_spot_algo_response::QuerySubOrdersSpotAlgoResponse; pub mod time_weighted_average_price_future_algo_response; pub use self::time_weighted_average_price_future_algo_response::TimeWeightedAveragePriceFutureAlgoResponse; pub mod time_weighted_average_price_spot_algo_response; pub use self::time_weighted_average_price_spot_algo_response::TimeWeightedAveragePriceSpotAlgoResponse; pub mod volume_participation_future_algo_response; pub use self::volume_participation_future_algo_response::VolumeParticipationFutureAlgoResponse; src/algo/rest_api/models/query_current_algo_open_orders_future_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentAlgoOpenOrdersFutureAlgoResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl QueryCurrentAlgoOpenOrdersFutureAlgoResponse { #[must_use] pub fn new() -> QueryCurrentAlgoOpenOrdersFutureAlgoResponse { QueryCurrentAlgoOpenOrdersFutureAlgoResponse { total: None, orders: None, } } } src/algo/rest_api/models/query_current_algo_open_orders_future_algo_response_orders_inner.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner { #[serde(rename = "algoId", skip_serializing_if = "Option::is_none")] pub algo_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "totalQty", skip_serializing_if = "Option::is_none")] pub total_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "executedAmt", skip_serializing_if = "Option::is_none")] pub executed_amt: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientAlgoId", skip_serializing_if = "Option::is_none")] pub client_algo_id: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")] pub end_time: Option, #[serde(rename = "algoStatus", skip_serializing_if = "Option::is_none")] pub algo_status: Option, #[serde(rename = "algoType", skip_serializing_if = "Option::is_none")] pub algo_type: Option, #[serde(rename = "urgency", skip_serializing_if = "Option::is_none")] pub urgency: Option, } impl QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner { #[must_use] pub fn new() -> QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner { QueryCurrentAlgoOpenOrdersFutureAlgoResponseOrdersInner { algo_id: None, symbol: None, side: None, position_side: None, total_qty: None, executed_qty: None, executed_amt: None, avg_price: None, client_algo_id: None, book_time: None, end_time: None, algo_status: None, algo_type: None, urgency: None, } } } src/algo/rest_api/models/query_current_algo_open_orders_spot_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentAlgoOpenOrdersSpotAlgoResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl QueryCurrentAlgoOpenOrdersSpotAlgoResponse { #[must_use] pub fn new() -> QueryCurrentAlgoOpenOrdersSpotAlgoResponse { QueryCurrentAlgoOpenOrdersSpotAlgoResponse { total: None, orders: None, } } } src/algo/rest_api/models/query_current_algo_open_orders_spot_algo_response_orders_inner.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner { #[serde(rename = "algoId", skip_serializing_if = "Option::is_none")] pub algo_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "totalQty", skip_serializing_if = "Option::is_none")] pub total_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "executedAmt", skip_serializing_if = "Option::is_none")] pub executed_amt: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientAlgoId", skip_serializing_if = "Option::is_none")] pub client_algo_id: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")] pub end_time: Option, #[serde(rename = "algoStatus", skip_serializing_if = "Option::is_none")] pub algo_status: Option, #[serde(rename = "algoType", skip_serializing_if = "Option::is_none")] pub algo_type: Option, #[serde(rename = "urgency", skip_serializing_if = "Option::is_none")] pub urgency: Option, } impl QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner { #[must_use] pub fn new() -> QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner { QueryCurrentAlgoOpenOrdersSpotAlgoResponseOrdersInner { algo_id: None, symbol: None, side: None, total_qty: None, executed_qty: None, executed_amt: None, avg_price: None, client_algo_id: None, book_time: None, end_time: None, algo_status: None, algo_type: None, urgency: None, } } } src/algo/rest_api/models/query_historical_algo_orders_future_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryHistoricalAlgoOrdersFutureAlgoResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl QueryHistoricalAlgoOrdersFutureAlgoResponse { #[must_use] pub fn new() -> QueryHistoricalAlgoOrdersFutureAlgoResponse { QueryHistoricalAlgoOrdersFutureAlgoResponse { total: None, orders: None, } } } src/algo/rest_api/models/query_historical_algo_orders_future_algo_response_orders_inner.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner { #[serde(rename = "algoId", skip_serializing_if = "Option::is_none")] pub algo_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "totalQty", skip_serializing_if = "Option::is_none")] pub total_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "executedAmt", skip_serializing_if = "Option::is_none")] pub executed_amt: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientAlgoId", skip_serializing_if = "Option::is_none")] pub client_algo_id: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")] pub end_time: Option, #[serde(rename = "algoStatus", skip_serializing_if = "Option::is_none")] pub algo_status: Option, #[serde(rename = "algoType", skip_serializing_if = "Option::is_none")] pub algo_type: Option, #[serde(rename = "urgency", skip_serializing_if = "Option::is_none")] pub urgency: Option, } impl QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner { #[must_use] pub fn new() -> QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner { QueryHistoricalAlgoOrdersFutureAlgoResponseOrdersInner { algo_id: None, symbol: None, side: None, position_side: None, total_qty: None, executed_qty: None, executed_amt: None, avg_price: None, client_algo_id: None, book_time: None, end_time: None, algo_status: None, algo_type: None, urgency: None, } } } src/algo/rest_api/models/query_historical_algo_orders_spot_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryHistoricalAlgoOrdersSpotAlgoResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl QueryHistoricalAlgoOrdersSpotAlgoResponse { #[must_use] pub fn new() -> QueryHistoricalAlgoOrdersSpotAlgoResponse { QueryHistoricalAlgoOrdersSpotAlgoResponse { total: None, orders: None, } } } src/algo/rest_api/models/query_historical_algo_orders_spot_algo_response_orders_inner.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner { #[serde(rename = "algoId", skip_serializing_if = "Option::is_none")] pub algo_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "totalQty", skip_serializing_if = "Option::is_none")] pub total_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "executedAmt", skip_serializing_if = "Option::is_none")] pub executed_amt: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientAlgoId", skip_serializing_if = "Option::is_none")] pub client_algo_id: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")] pub end_time: Option, #[serde(rename = "algoStatus", skip_serializing_if = "Option::is_none")] pub algo_status: Option, #[serde(rename = "algoType", skip_serializing_if = "Option::is_none")] pub algo_type: Option, #[serde(rename = "urgency", skip_serializing_if = "Option::is_none")] pub urgency: Option, } impl QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner { #[must_use] pub fn new() -> QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner { QueryHistoricalAlgoOrdersSpotAlgoResponseOrdersInner { algo_id: None, symbol: None, side: None, total_qty: None, executed_qty: None, executed_amt: None, avg_price: None, client_algo_id: None, book_time: None, end_time: None, algo_status: None, algo_type: None, urgency: None, } } } src/algo/rest_api/models/query_sub_orders_future_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubOrdersFutureAlgoResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "executedAmt", skip_serializing_if = "Option::is_none")] pub executed_amt: Option, #[serde(rename = "subOrders", skip_serializing_if = "Option::is_none")] pub sub_orders: Option>, } impl QuerySubOrdersFutureAlgoResponse { #[must_use] pub fn new() -> QuerySubOrdersFutureAlgoResponse { QuerySubOrdersFutureAlgoResponse { total: None, executed_qty: None, executed_amt: None, sub_orders: None, } } } src/algo/rest_api/models/query_sub_orders_future_algo_response_sub_orders_inner.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubOrdersFutureAlgoResponseSubOrdersInner { #[serde(rename = "algoId", skip_serializing_if = "Option::is_none")] pub algo_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderStatus", skip_serializing_if = "Option::is_none")] pub order_status: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "executedAmt", skip_serializing_if = "Option::is_none")] pub executed_amt: Option, #[serde(rename = "feeAmt", skip_serializing_if = "Option::is_none")] pub fee_amt: Option, #[serde(rename = "feeAsset", skip_serializing_if = "Option::is_none")] pub fee_asset: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "subId", skip_serializing_if = "Option::is_none")] pub sub_id: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, } impl QuerySubOrdersFutureAlgoResponseSubOrdersInner { #[must_use] pub fn new() -> QuerySubOrdersFutureAlgoResponseSubOrdersInner { QuerySubOrdersFutureAlgoResponseSubOrdersInner { algo_id: None, order_id: None, order_status: None, executed_qty: None, executed_amt: None, fee_amt: None, fee_asset: None, book_time: None, avg_price: None, side: None, symbol: None, sub_id: None, time_in_force: None, orig_qty: None, } } } src/algo/rest_api/models/query_sub_orders_spot_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubOrdersSpotAlgoResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "executedAmt", skip_serializing_if = "Option::is_none")] pub executed_amt: Option, #[serde(rename = "subOrders", skip_serializing_if = "Option::is_none")] pub sub_orders: Option>, } impl QuerySubOrdersSpotAlgoResponse { #[must_use] pub fn new() -> QuerySubOrdersSpotAlgoResponse { QuerySubOrdersSpotAlgoResponse { total: None, executed_qty: None, executed_amt: None, sub_orders: None, } } } src/algo/rest_api/models/time_weighted_average_price_future_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TimeWeightedAveragePriceFutureAlgoResponse { #[serde(rename = "clientAlgoId", skip_serializing_if = "Option::is_none")] pub client_algo_id: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl TimeWeightedAveragePriceFutureAlgoResponse { #[must_use] pub fn new() -> TimeWeightedAveragePriceFutureAlgoResponse { TimeWeightedAveragePriceFutureAlgoResponse { client_algo_id: None, success: None, code: None, msg: None, } } } src/algo/rest_api/models/time_weighted_average_price_spot_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TimeWeightedAveragePriceSpotAlgoResponse { #[serde(rename = "clientAlgoId", skip_serializing_if = "Option::is_none")] pub client_algo_id: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl TimeWeightedAveragePriceSpotAlgoResponse { #[must_use] pub fn new() -> TimeWeightedAveragePriceSpotAlgoResponse { TimeWeightedAveragePriceSpotAlgoResponse { client_algo_id: None, success: None, code: None, msg: None, } } } src/algo/rest_api/models/volume_participation_future_algo_response.rs /* * Binance Algo REST API * * OpenAPI Specification for the Binance Algo REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::algo::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct VolumeParticipationFutureAlgoResponse { #[serde(rename = "clientAlgoId", skip_serializing_if = "Option::is_none")] pub client_algo_id: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl VolumeParticipationFutureAlgoResponse { #[must_use] pub fn new() -> VolumeParticipationFutureAlgoResponse { VolumeParticipationFutureAlgoResponse { client_algo_id: None, success: None, code: None, msg: None, } } } src/c2c/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::c2c; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = c2c::C2CRestApi::production(configuration); let params = c2c::rest_api::GetC2CTradeHistoryParams::default(); let response = client.get_c2_c_trade_history(params).await?; ``` src/c2c/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::c2c; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = c2c::C2CRestApi::production(configuration); let params = c2c::rest_api::GetC2CTradeHistoryParams::default(); let response = client.get_c2_c_trade_history(params).await?; ``` src/c2c/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::c2c; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = c2c::C2CRestApi::production(configuration); let params = c2c::rest_api::GetC2CTradeHistoryParams::default(); let response = client.get_c2_c_trade_history(params).await?; match client.get_c2_c_trade_history(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/c2c/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::c2c; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = c2c::C2CRestApi::production(configuration); let params = c2c::rest_api::GetC2CTradeHistoryParams::default(); let response = client.get_c2_c_trade_history(params).await?; ``` src/c2c/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::c2c; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = c2c::C2CRestApi::production(configuration); let params = c2c::rest_api::GetC2CTradeHistoryParams::default(); let response = client.get_c2_c_trade_history(params).await?; ``` src/c2c/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::c2c; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = c2c::C2CRestApi::production(configuration); let params = c2c::rest_api::GetC2CTradeHistoryParams::default(); let response = client.get_c2_c_trade_history(params).await?; ``` src/c2c/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::c2c; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = c2c::C2CRestApi::production(configuration); let params = c2c::rest_api::GetC2CTradeHistoryParams::default(); let response = client.get_c2_c_trade_history(params).await?; ``` src/c2c/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::c2c; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = c2c::C2CRestApi::production(configuration); let params = c2c::rest_api::GetC2CTradeHistoryParams::default(); let response = client.get_c2_c_trade_history(params).await?; ``` src/c2c/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::c2c; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = c2c::C2CRestApi::production(configuration); let params = c2c::rest_api::GetC2CTradeHistoryParams::default(); let response = client.get_c2_c_trade_history(params).await?; ``` src/c2c/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::C2C_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the C2C REST API client for interacting with the Binance C2C REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct C2CRestApi {} impl C2CRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production C2C REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("c2c"); if config.base_path.is_none() { config.base_path = Some(C2C_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(C2C_REST_API_PROD_URL.to_string()); C2CRestApi::from_config(config) } } src/c2c/rest_api/apis/mod.rs /* * Binance C2C REST API * * OpenAPI Specification for the Binance C2C REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod c2_c_api; pub use c2_c_api::*; src/c2c/rest_api/models/get_c2_c_trade_history_response.rs /* * Binance C2C REST API * * OpenAPI Specification for the Binance C2C REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::c2c::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetC2CTradeHistoryResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl GetC2CTradeHistoryResponse { #[must_use] pub fn new() -> GetC2CTradeHistoryResponse { GetC2CTradeHistoryResponse { code: None, message: None, data: None, total: None, success: None, } } } src/c2c/rest_api/models/get_c2_c_trade_history_response_data_inner.rs /* * Binance C2C REST API * * OpenAPI Specification for the Binance C2C REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::c2c::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetC2CTradeHistoryResponseDataInner { #[serde(rename = "orderNumber", skip_serializing_if = "Option::is_none")] pub order_number: Option, #[serde(rename = "advNo", skip_serializing_if = "Option::is_none")] pub adv_no: Option, #[serde(rename = "tradeType", skip_serializing_if = "Option::is_none")] pub trade_type: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "fiat", skip_serializing_if = "Option::is_none")] pub fiat: Option, #[serde(rename = "fiatSymbol", skip_serializing_if = "Option::is_none")] pub fiat_symbol: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "totalPrice", skip_serializing_if = "Option::is_none")] pub total_price: Option, #[serde(rename = "unitPrice", skip_serializing_if = "Option::is_none")] pub unit_price: Option, #[serde(rename = "orderStatus", skip_serializing_if = "Option::is_none")] pub order_status: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde( rename = "counterPartNickName", skip_serializing_if = "Option::is_none" )] pub counter_part_nick_name: Option, #[serde(rename = "advertisementRole", skip_serializing_if = "Option::is_none")] pub advertisement_role: Option, } impl GetC2CTradeHistoryResponseDataInner { #[must_use] pub fn new() -> GetC2CTradeHistoryResponseDataInner { GetC2CTradeHistoryResponseDataInner { order_number: None, adv_no: None, trade_type: None, asset: None, fiat: None, fiat_symbol: None, amount: None, total_price: None, unit_price: None, order_status: None, create_time: None, commission: None, counter_part_nick_name: None, advertisement_role: None, } } } src/c2c/rest_api/models/mod.rs /* * Binance C2C REST API * * OpenAPI Specification for the Binance C2C REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod get_c2_c_trade_history_response; pub use self::get_c2_c_trade_history_response::GetC2CTradeHistoryResponse; pub mod get_c2_c_trade_history_response_data_inner; pub use self::get_c2_c_trade_history_response_data_inner::GetC2CTradeHistoryResponseDataInner; src/common/logger.rs use std::sync::Once; use tracing_subscriber::{EnvFilter, Registry, fmt, layer::SubscriberExt}; static INIT_LOG: Once = Once::new(); /// Initializes the global tracing subscriber with a configured log level and formatting. /// /// This function sets up a tracing subscriber with a default log level of "info", /// which can be overridden by environment variables. It configures the log output /// to disable log targets, and enable thread IDs and thread names. /// /// The initialization is performed only once using a `Once` synchronization primitive /// to ensure thread-safe global subscriber setup. pub fn init() { let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); let fmt_layer = fmt::layer() .with_target(false) .with_thread_ids(true) .with_thread_names(true); INIT_LOG.call_once(|| { let subscriber = Registry::default().with(filter).with(fmt_layer); let _ = tracing::subscriber::set_global_default(subscriber); }); } src/common/mod.rs pub mod config; pub mod constants; pub mod errors; pub mod logger; pub mod models; pub mod utils; pub mod websocket; src/convert/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::convert; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = convert::ConvertRestApi::production(configuration); let params = convert::rest_api::ListAllConvertPairsParams::default(); let response = client.list_all_convert_pairs(params).await?; ``` src/convert/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::convert; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = convert::ConvertRestApi::production(configuration); let params = convert::rest_api::ListAllConvertPairsParams::default(); let response = client.list_all_convert_pairs(params).await?; ``` src/convert/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::convert; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = convert::ConvertRestApi::production(configuration); let params = convert::rest_api::ListAllConvertPairsParams::default(); match client.list_all_convert_pairs(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/convert/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::convert; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = convert::ConvertRestApi::production(configuration); let params = convert::rest_api::ListAllConvertPairsParams::default(); let response = client.list_all_convert_pairs(params).await?; ``` src/convert/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::convert; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = convert::ConvertRestApi::production(configuration); let params = convert::rest_api::ListAllConvertPairsParams::default(); let response = client.list_all_convert_pairs(params).await?; ``` src/convert/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::convert; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = convert::ConvertRestApi::production(configuration); let params = convert::rest_api::ListAllConvertPairsParams::default(); let response = client.list_all_convert_pairs(params).await?; ``` src/convert/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::convert; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = convert::ConvertRestApi::production(configuration); let params = convert::rest_api::ListAllConvertPairsParams::default(); let response = client.list_all_convert_pairs(params).await?; ``` src/convert/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::convert; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = convert::ConvertRestApi::production(configuration); let params = convert::rest_api::ListAllConvertPairsParams::default(); let response = client.list_all_convert_pairs(params).await?; ``` src/convert/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::convert; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = convert::ConvertRestApi::production(configuration); let params = convert::rest_api::ListAllConvertPairsParams::default(); let response = client.list_all_convert_pairs(params).await?; ``` src/convert/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::CONVERT_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the Convert REST API client for interacting with the Binance Convert REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct ConvertRestApi {} impl ConvertRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production Convert REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("convert"); if config.base_path.is_none() { config.base_path = Some(CONVERT_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(CONVERT_REST_API_PROD_URL.to_string()); ConvertRestApi::from_config(config) } } src/convert/rest_api/apis/mod.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod market_data_api; pub use market_data_api::*; pub mod trade_api; pub use trade_api::*; src/convert/rest_api/models/accept_quote_response.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcceptQuoteResponse { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "orderStatus", skip_serializing_if = "Option::is_none")] pub order_status: Option, } impl AcceptQuoteResponse { #[must_use] pub fn new() -> AcceptQuoteResponse { AcceptQuoteResponse { order_id: None, create_time: None, order_status: None, } } } src/convert/rest_api/models/cancel_limit_order_response.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelLimitOrderResponse { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl CancelLimitOrderResponse { #[must_use] pub fn new() -> CancelLimitOrderResponse { CancelLimitOrderResponse { order_id: None, status: None, } } } src/convert/rest_api/models/get_convert_trade_history_response.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetConvertTradeHistoryResponse { #[serde(rename = "list", skip_serializing_if = "Option::is_none")] pub list: Option>, #[serde(rename = "startTime", skip_serializing_if = "Option::is_none")] pub start_time: Option, #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")] pub end_time: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "moreData", skip_serializing_if = "Option::is_none")] pub more_data: Option, } impl GetConvertTradeHistoryResponse { #[must_use] pub fn new() -> GetConvertTradeHistoryResponse { GetConvertTradeHistoryResponse { list: None, start_time: None, end_time: None, limit: None, more_data: None, } } } src/convert/rest_api/models/get_convert_trade_history_response_list_inner.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetConvertTradeHistoryResponseListInner { #[serde(rename = "quoteId", skip_serializing_if = "Option::is_none")] pub quote_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderStatus", skip_serializing_if = "Option::is_none")] pub order_status: Option, #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")] pub from_asset: Option, #[serde(rename = "fromAmount", skip_serializing_if = "Option::is_none")] pub from_amount: Option, #[serde(rename = "toAsset", skip_serializing_if = "Option::is_none")] pub to_asset: Option, #[serde(rename = "toAmount", skip_serializing_if = "Option::is_none")] pub to_amount: Option, #[serde(rename = "ratio", skip_serializing_if = "Option::is_none")] pub ratio: Option, #[serde(rename = "inverseRatio", skip_serializing_if = "Option::is_none")] pub inverse_ratio: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, } impl GetConvertTradeHistoryResponseListInner { #[must_use] pub fn new() -> GetConvertTradeHistoryResponseListInner { GetConvertTradeHistoryResponseListInner { quote_id: None, order_id: None, order_status: None, from_asset: None, from_amount: None, to_asset: None, to_amount: None, ratio: None, inverse_ratio: None, create_time: None, } } } src/convert/rest_api/models/list_all_convert_pairs_response_inner.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ListAllConvertPairsResponseInner { #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")] pub from_asset: Option, #[serde(rename = "toAsset", skip_serializing_if = "Option::is_none")] pub to_asset: Option, #[serde(rename = "fromAssetMinAmount", skip_serializing_if = "Option::is_none")] pub from_asset_min_amount: Option, #[serde(rename = "fromAssetMaxAmount", skip_serializing_if = "Option::is_none")] pub from_asset_max_amount: Option, #[serde(rename = "toAssetMinAmount", skip_serializing_if = "Option::is_none")] pub to_asset_min_amount: Option, #[serde(rename = "toAssetMaxAmount", skip_serializing_if = "Option::is_none")] pub to_asset_max_amount: Option, } impl ListAllConvertPairsResponseInner { #[must_use] pub fn new() -> ListAllConvertPairsResponseInner { ListAllConvertPairsResponseInner { from_asset: None, to_asset: None, from_asset_min_amount: None, from_asset_max_amount: None, to_asset_min_amount: None, to_asset_max_amount: None, } } } src/convert/rest_api/models/mod.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod accept_quote_response; pub use self::accept_quote_response::AcceptQuoteResponse; pub mod cancel_limit_order_response; pub use self::cancel_limit_order_response::CancelLimitOrderResponse; pub mod get_convert_trade_history_response; pub use self::get_convert_trade_history_response::GetConvertTradeHistoryResponse; pub mod get_convert_trade_history_response_list_inner; pub use self::get_convert_trade_history_response_list_inner::GetConvertTradeHistoryResponseListInner; pub mod list_all_convert_pairs_response_inner; pub use self::list_all_convert_pairs_response_inner::ListAllConvertPairsResponseInner; pub mod order_status_response; pub use self::order_status_response::OrderStatusResponse; pub mod place_limit_order_response; pub use self::place_limit_order_response::PlaceLimitOrderResponse; pub mod query_limit_open_orders_response; pub use self::query_limit_open_orders_response::QueryLimitOpenOrdersResponse; pub mod query_limit_open_orders_response_list_inner; pub use self::query_limit_open_orders_response_list_inner::QueryLimitOpenOrdersResponseListInner; pub mod query_order_quantity_precision_per_asset_response_inner; pub use self::query_order_quantity_precision_per_asset_response_inner::QueryOrderQuantityPrecisionPerAssetResponseInner; pub mod send_quote_request_response; pub use self::send_quote_request_response::SendQuoteRequestResponse; src/convert/rest_api/models/order_status_response.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderStatusResponse { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderStatus", skip_serializing_if = "Option::is_none")] pub order_status: Option, #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")] pub from_asset: Option, #[serde(rename = "fromAmount", skip_serializing_if = "Option::is_none")] pub from_amount: Option, #[serde(rename = "toAsset", skip_serializing_if = "Option::is_none")] pub to_asset: Option, #[serde(rename = "toAmount", skip_serializing_if = "Option::is_none")] pub to_amount: Option, #[serde(rename = "ratio", skip_serializing_if = "Option::is_none")] pub ratio: Option, #[serde(rename = "inverseRatio", skip_serializing_if = "Option::is_none")] pub inverse_ratio: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, } impl OrderStatusResponse { #[must_use] pub fn new() -> OrderStatusResponse { OrderStatusResponse { order_id: None, order_status: None, from_asset: None, from_amount: None, to_asset: None, to_amount: None, ratio: None, inverse_ratio: None, create_time: None, } } } src/convert/rest_api/models/place_limit_order_response.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PlaceLimitOrderResponse { #[serde(rename = "quoteId", skip_serializing_if = "Option::is_none")] pub quote_id: Option, #[serde(rename = "ratio", skip_serializing_if = "Option::is_none")] pub ratio: Option, #[serde(rename = "inverseRatio", skip_serializing_if = "Option::is_none")] pub inverse_ratio: Option, #[serde(rename = "validTimestamp", skip_serializing_if = "Option::is_none")] pub valid_timestamp: Option, #[serde(rename = "toAmount", skip_serializing_if = "Option::is_none")] pub to_amount: Option, #[serde(rename = "fromAmount", skip_serializing_if = "Option::is_none")] pub from_amount: Option, } impl PlaceLimitOrderResponse { #[must_use] pub fn new() -> PlaceLimitOrderResponse { PlaceLimitOrderResponse { quote_id: None, ratio: None, inverse_ratio: None, valid_timestamp: None, to_amount: None, from_amount: None, } } } src/convert/rest_api/models/query_limit_open_orders_response.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryLimitOpenOrdersResponse { #[serde(rename = "list", skip_serializing_if = "Option::is_none")] pub list: Option>, } impl QueryLimitOpenOrdersResponse { #[must_use] pub fn new() -> QueryLimitOpenOrdersResponse { QueryLimitOpenOrdersResponse { list: None } } } src/convert/rest_api/models/query_limit_open_orders_response_list_inner.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryLimitOpenOrdersResponseListInner { #[serde(rename = "quoteId", skip_serializing_if = "Option::is_none")] pub quote_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderStatus", skip_serializing_if = "Option::is_none")] pub order_status: Option, #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")] pub from_asset: Option, #[serde(rename = "fromAmount", skip_serializing_if = "Option::is_none")] pub from_amount: Option, #[serde(rename = "toAsset", skip_serializing_if = "Option::is_none")] pub to_asset: Option, #[serde(rename = "toAmount", skip_serializing_if = "Option::is_none")] pub to_amount: Option, #[serde(rename = "ratio", skip_serializing_if = "Option::is_none")] pub ratio: Option, #[serde(rename = "inverseRatio", skip_serializing_if = "Option::is_none")] pub inverse_ratio: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "expiredTimestamp", skip_serializing_if = "Option::is_none")] pub expired_timestamp: Option, } impl QueryLimitOpenOrdersResponseListInner { #[must_use] pub fn new() -> QueryLimitOpenOrdersResponseListInner { QueryLimitOpenOrdersResponseListInner { quote_id: None, order_id: None, order_status: None, from_asset: None, from_amount: None, to_asset: None, to_amount: None, ratio: None, inverse_ratio: None, create_time: None, expired_timestamp: None, } } } src/convert/rest_api/models/query_order_quantity_precision_per_asset_response_inner.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryOrderQuantityPrecisionPerAssetResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "fraction", skip_serializing_if = "Option::is_none")] pub fraction: Option, } impl QueryOrderQuantityPrecisionPerAssetResponseInner { #[must_use] pub fn new() -> QueryOrderQuantityPrecisionPerAssetResponseInner { QueryOrderQuantityPrecisionPerAssetResponseInner { asset: None, fraction: None, } } } src/convert/rest_api/models/send_quote_request_response.rs /* * Binance Convert REST API * * OpenAPI Specification for the Binance Convert REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::convert::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SendQuoteRequestResponse { #[serde(rename = "quoteId", skip_serializing_if = "Option::is_none")] pub quote_id: Option, #[serde(rename = "ratio", skip_serializing_if = "Option::is_none")] pub ratio: Option, #[serde(rename = "inverseRatio", skip_serializing_if = "Option::is_none")] pub inverse_ratio: Option, #[serde(rename = "validTimestamp", skip_serializing_if = "Option::is_none")] pub valid_timestamp: Option, #[serde(rename = "toAmount", skip_serializing_if = "Option::is_none")] pub to_amount: Option, #[serde(rename = "fromAmount", skip_serializing_if = "Option::is_none")] pub from_amount: Option, } impl SendQuoteRequestResponse { #[must_use] pub fn new() -> SendQuoteRequestResponse { SendQuoteRequestResponse { quote_id: None, ratio: None, inverse_ratio: None, valid_timestamp: None, to_amount: None, from_amount: None, } } } src/copy_trading/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::copy_trading; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = copy_trading::CopyTradingRestApi::production(configuration); let params = copy_trading::rest_api::GetFuturesLeadTraderStatusParams::default(); let response = client.get_futures_lead_trader_status(params).await?; ``` src/copy_trading/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::copy_trading; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = copy_trading::CopyTradingRestApi::production(configuration); let params = copy_trading::rest_api::GetFuturesLeadTraderStatusParams::default(); let response = client.get_futures_lead_trader_status(params).await?; ``` src/copy_trading/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::copy_trading; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = copy_trading::CopyTradingRestApi::production(configuration); let params = copy_trading::rest_api::GetFuturesLeadTraderStatusParams::default(); match client.get_futures_lead_trader_status(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/copy_trading/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::copy_trading; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = copy_trading::CopyTradingRestApi::production(configuration); let params = copy_trading::rest_api::GetFuturesLeadTraderStatusParams::default(); let response = client.get_futures_lead_trader_status(params).await?; ``` src/copy_trading/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::copy_trading; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = copy_trading::CopyTradingRestApi::production(configuration); let params = copy_trading::rest_api::GetFuturesLeadTraderStatusParams::default(); let response = client.get_futures_lead_trader_status(params).await?; ``` src/copy_trading/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::copy_trading; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = copy_trading::CopyTradingRestApi::production(configuration); let params = copy_trading::rest_api::GetFuturesLeadTraderStatusParams::default(); let response = client.get_futures_lead_trader_status(params).await?; ``` src/copy_trading/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::copy_trading; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = copy_trading::CopyTradingRestApi::production(configuration); let params = copy_trading::rest_api::GetFuturesLeadTraderStatusParams::default(); let response = client.get_futures_lead_trader_status(params).await?; ``` src/copy_trading/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::copy_trading; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = copy_trading::CopyTradingRestApi::production(configuration); let params = copy_trading::rest_api::GetFuturesLeadTraderStatusParams::default(); let response = client.get_futures_lead_trader_status(params).await?; ``` src/copy_trading/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::copy_trading; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = copy_trading::CopyTradingRestApi::production(configuration); let params = copy_trading::rest_api::GetFuturesLeadTraderStatusParams::default(); let response = client.get_futures_lead_trader_status(params).await?; ``` src/copy_trading/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::COPY_TRADING_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the `CopyTrading` REST API client for interacting with the Binance `CopyTrading` REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct CopyTradingRestApi {} impl CopyTradingRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production `CopyTrading` REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("copy-trading"); if config.base_path.is_none() { config.base_path = Some(COPY_TRADING_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(COPY_TRADING_REST_API_PROD_URL.to_string()); CopyTradingRestApi::from_config(config) } } src/copy_trading/rest_api/apis/mod.rs /* * Binance Copy Trading REST API * * OpenAPI Specification for the Binance Copy Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod future_copy_trading_api; pub use future_copy_trading_api::*; src/copy_trading/rest_api/models/get_futures_lead_trader_status_response.rs /* * Binance Copy Trading REST API * * OpenAPI Specification for the Binance Copy Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::copy_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesLeadTraderStatusResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl GetFuturesLeadTraderStatusResponse { #[must_use] pub fn new() -> GetFuturesLeadTraderStatusResponse { GetFuturesLeadTraderStatusResponse { code: None, message: None, data: None, success: None, } } } src/copy_trading/rest_api/models/get_futures_lead_trader_status_response_data.rs /* * Binance Copy Trading REST API * * OpenAPI Specification for the Binance Copy Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::copy_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesLeadTraderStatusResponseData { #[serde(rename = "isLeadTrader", skip_serializing_if = "Option::is_none")] pub is_lead_trader: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl GetFuturesLeadTraderStatusResponseData { #[must_use] pub fn new() -> GetFuturesLeadTraderStatusResponseData { GetFuturesLeadTraderStatusResponseData { is_lead_trader: None, time: None, } } } src/copy_trading/rest_api/models/get_futures_lead_trading_symbol_whitelist_response.rs /* * Binance Copy Trading REST API * * OpenAPI Specification for the Binance Copy Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::copy_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesLeadTradingSymbolWhitelistResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl GetFuturesLeadTradingSymbolWhitelistResponse { #[must_use] pub fn new() -> GetFuturesLeadTradingSymbolWhitelistResponse { GetFuturesLeadTradingSymbolWhitelistResponse { code: None, message: None, data: None, } } } src/copy_trading/rest_api/models/get_futures_lead_trading_symbol_whitelist_response_data_inner.rs /* * Binance Copy Trading REST API * * OpenAPI Specification for the Binance Copy Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::copy_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesLeadTradingSymbolWhitelistResponseDataInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "baseAsset", skip_serializing_if = "Option::is_none")] pub base_asset: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, } impl GetFuturesLeadTradingSymbolWhitelistResponseDataInner { #[must_use] pub fn new() -> GetFuturesLeadTradingSymbolWhitelistResponseDataInner { GetFuturesLeadTradingSymbolWhitelistResponseDataInner { symbol: None, base_asset: None, quote_asset: None, } } } src/copy_trading/rest_api/models/mod.rs /* * Binance Copy Trading REST API * * OpenAPI Specification for the Binance Copy Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod get_futures_lead_trader_status_response; pub use self::get_futures_lead_trader_status_response::GetFuturesLeadTraderStatusResponse; pub mod get_futures_lead_trader_status_response_data; pub use self::get_futures_lead_trader_status_response_data::GetFuturesLeadTraderStatusResponseData; pub mod get_futures_lead_trading_symbol_whitelist_response; pub use self::get_futures_lead_trading_symbol_whitelist_response::GetFuturesLeadTradingSymbolWhitelistResponse; pub mod get_futures_lead_trading_symbol_whitelist_response_data_inner; pub use self::get_futures_lead_trading_symbol_whitelist_response_data_inner::GetFuturesLeadTradingSymbolWhitelistResponseDataInner; src/crypto_loan/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::crypto_loan; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = crypto_loan::CryptoLoanRestApi::production(configuration); let params = crypto_loan::rest_api::GetFlexibleLoanBorrowHistoryParams::default(); let response = client.get_flexible_loan_borrow_history(params).await?; ``` src/crypto_loan/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::crypto_loan; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = crypto_loan::CryptoLoanRestApi::production(configuration); let params = crypto_loan::rest_api::GetFlexibleLoanBorrowHistoryParams::default(); let response = client.get_flexible_loan_borrow_history(params).await?; ``` src/crypto_loan/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::crypto_loan; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = crypto_loan::CryptoLoanRestApi::production(configuration); let params = crypto_loan::rest_api::GetFlexibleLoanBorrowHistoryParams::default(); match client.get_flexible_loan_borrow_history(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/crypto_loan/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::crypto_loan; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = crypto_loan::CryptoLoanRestApi::production(configuration); let params = crypto_loan::rest_api::GetFlexibleLoanBorrowHistoryParams::default(); let response = client.get_flexible_loan_borrow_history(params).await?; ``` src/crypto_loan/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::crypto_loan; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = crypto_loan::CryptoLoanRestApi::production(configuration); let params = crypto_loan::rest_api::GetFlexibleLoanBorrowHistoryParams::default(); let response = client.get_flexible_loan_borrow_history(params).await?; ``` src/crypto_loan/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::crypto_loan; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = crypto_loan::CryptoLoanRestApi::production(configuration); let params = crypto_loan::rest_api::GetFlexibleLoanBorrowHistoryParams::default(); let response = client.get_flexible_loan_borrow_history(params).await?; ``` src/crypto_loan/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::crypto_loan; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = crypto_loan::CryptoLoanRestApi::production(configuration); let params = crypto_loan::rest_api::GetFlexibleLoanBorrowHistoryParams::default(); let response = client.get_flexible_loan_borrow_history(params).await?; ``` src/crypto_loan/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::crypto_loan; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = crypto_loan::CryptoLoanRestApi::production(configuration); let params = crypto_loan::rest_api::GetFlexibleLoanBorrowHistoryParams::default(); let response = client.get_flexible_loan_borrow_history(params).await?; ``` src/crypto_loan/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::crypto_loan; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = crypto_loan::CryptoLoanRestApi::production(configuration); let params = crypto_loan::rest_api::GetFlexibleLoanBorrowHistoryParams::default(); let response = client.get_flexible_loan_borrow_history(params).await?; ``` src/crypto_loan/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::CRYPTO_LOAN_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the `CryptoLoan` REST API client for interacting with the Binance `CryptoLoan` REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct CryptoLoanRestApi {} impl CryptoLoanRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production `CryptoLoan` REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("crypto-loan"); if config.base_path.is_none() { config.base_path = Some(CRYPTO_LOAN_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(CRYPTO_LOAN_REST_API_PROD_URL.to_string()); CryptoLoanRestApi::from_config(config) } } src/crypto_loan/rest_api/apis/mod.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod flexible_rate_api; pub use flexible_rate_api::*; pub mod stable_rate_api; pub use stable_rate_api::*; src/crypto_loan/rest_api/models/check_collateral_repay_rate_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckCollateralRepayRateResponse { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "rate", skip_serializing_if = "Option::is_none")] pub rate: Option, } impl CheckCollateralRepayRateResponse { #[must_use] pub fn new() -> CheckCollateralRepayRateResponse { CheckCollateralRepayRateResponse { loan_coin: None, collateral_coin: None, rate: None, } } } src/crypto_loan/rest_api/models/check_collateral_repay_rate_stable_rate_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckCollateralRepayRateStableRateResponse { #[serde(rename = "loanlCoin", skip_serializing_if = "Option::is_none")] pub loanl_coin: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "repayAmount", skip_serializing_if = "Option::is_none")] pub repay_amount: Option, #[serde(rename = "rate", skip_serializing_if = "Option::is_none")] pub rate: Option, } impl CheckCollateralRepayRateStableRateResponse { #[must_use] pub fn new() -> CheckCollateralRepayRateStableRateResponse { CheckCollateralRepayRateStableRateResponse { loanl_coin: None, collateral_coin: None, repay_amount: None, rate: None, } } } src/crypto_loan/rest_api/models/flexible_loan_adjust_ltv_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexibleLoanAdjustLtvResponse { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "direction", skip_serializing_if = "Option::is_none")] pub direction: Option, #[serde(rename = "adjustmentAmount", skip_serializing_if = "Option::is_none")] pub adjustment_amount: Option, #[serde(rename = "currentLTV", skip_serializing_if = "Option::is_none")] pub current_ltv: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl FlexibleLoanAdjustLtvResponse { #[must_use] pub fn new() -> FlexibleLoanAdjustLtvResponse { FlexibleLoanAdjustLtvResponse { loan_coin: None, collateral_coin: None, direction: None, adjustment_amount: None, current_ltv: None, status: None, } } } src/crypto_loan/rest_api/models/flexible_loan_borrow_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexibleLoanBorrowResponse { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "loanAmount", skip_serializing_if = "Option::is_none")] pub loan_amount: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "collateralAmount", skip_serializing_if = "Option::is_none")] pub collateral_amount: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl FlexibleLoanBorrowResponse { #[must_use] pub fn new() -> FlexibleLoanBorrowResponse { FlexibleLoanBorrowResponse { loan_coin: None, loan_amount: None, collateral_coin: None, collateral_amount: None, status: None, } } } src/crypto_loan/rest_api/models/flexible_loan_repay_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexibleLoanRepayResponse { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "remainingDebt", skip_serializing_if = "Option::is_none")] pub remaining_debt: Option, #[serde( rename = "remainingCollateral", skip_serializing_if = "Option::is_none" )] pub remaining_collateral: Option, #[serde(rename = "fullRepayment", skip_serializing_if = "Option::is_none")] pub full_repayment: Option, #[serde(rename = "currentLTV", skip_serializing_if = "Option::is_none")] pub current_ltv: Option, #[serde(rename = "repayStatus", skip_serializing_if = "Option::is_none")] pub repay_status: Option, } impl FlexibleLoanRepayResponse { #[must_use] pub fn new() -> FlexibleLoanRepayResponse { FlexibleLoanRepayResponse { loan_coin: None, collateral_coin: None, remaining_debt: None, remaining_collateral: None, full_repayment: None, current_ltv: None, repay_status: None, } } } src/crypto_loan/rest_api/models/get_crypto_loans_income_history_response_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCryptoLoansIncomeHistoryResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl GetCryptoLoansIncomeHistoryResponseInner { #[must_use] pub fn new() -> GetCryptoLoansIncomeHistoryResponseInner { GetCryptoLoansIncomeHistoryResponseInner { asset: None, r#type: None, amount: None, timestamp: None, tran_id: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_assets_data_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanAssetsDataResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleLoanAssetsDataResponse { #[must_use] pub fn new() -> GetFlexibleLoanAssetsDataResponse { GetFlexibleLoanAssetsDataResponse { rows: None, total: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_assets_data_response_rows_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanAssetsDataResponseRowsInner { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde( rename = "flexibleInterestRate", skip_serializing_if = "Option::is_none" )] pub flexible_interest_rate: Option, #[serde(rename = "flexibleMinLimit", skip_serializing_if = "Option::is_none")] pub flexible_min_limit: Option, #[serde(rename = "flexibleMaxLimit", skip_serializing_if = "Option::is_none")] pub flexible_max_limit: Option, } impl GetFlexibleLoanAssetsDataResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleLoanAssetsDataResponseRowsInner { GetFlexibleLoanAssetsDataResponseRowsInner { loan_coin: None, flexible_interest_rate: None, flexible_min_limit: None, flexible_max_limit: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_borrow_history_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanBorrowHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleLoanBorrowHistoryResponse { #[must_use] pub fn new() -> GetFlexibleLoanBorrowHistoryResponse { GetFlexibleLoanBorrowHistoryResponse { rows: None, total: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_borrow_history_response_rows_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanBorrowHistoryResponseRowsInner { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "initialLoanAmount", skip_serializing_if = "Option::is_none")] pub initial_loan_amount: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde( rename = "initialCollateralAmount", skip_serializing_if = "Option::is_none" )] pub initial_collateral_amount: Option, #[serde(rename = "borrowTime", skip_serializing_if = "Option::is_none")] pub borrow_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetFlexibleLoanBorrowHistoryResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleLoanBorrowHistoryResponseRowsInner { GetFlexibleLoanBorrowHistoryResponseRowsInner { loan_coin: None, initial_loan_amount: None, collateral_coin: None, initial_collateral_amount: None, borrow_time: None, status: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_collateral_assets_data_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanCollateralAssetsDataResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleLoanCollateralAssetsDataResponse { #[must_use] pub fn new() -> GetFlexibleLoanCollateralAssetsDataResponse { GetFlexibleLoanCollateralAssetsDataResponse { rows: None, total: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_collateral_assets_data_response_rows_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanCollateralAssetsDataResponseRowsInner { #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "initialLTV", skip_serializing_if = "Option::is_none")] pub initial_ltv: Option, #[serde(rename = "marginCallLTV", skip_serializing_if = "Option::is_none")] pub margin_call_ltv: Option, #[serde(rename = "liquidationLTV", skip_serializing_if = "Option::is_none")] pub liquidation_ltv: Option, #[serde(rename = "maxLimit", skip_serializing_if = "Option::is_none")] pub max_limit: Option, } impl GetFlexibleLoanCollateralAssetsDataResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleLoanCollateralAssetsDataResponseRowsInner { GetFlexibleLoanCollateralAssetsDataResponseRowsInner { collateral_coin: None, initial_ltv: None, margin_call_ltv: None, liquidation_ltv: None, max_limit: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_liquidation_history_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanLiquidationHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleLoanLiquidationHistoryResponse { #[must_use] pub fn new() -> GetFlexibleLoanLiquidationHistoryResponse { GetFlexibleLoanLiquidationHistoryResponse { rows: None, total: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_liquidation_history_response_rows_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanLiquidationHistoryResponseRowsInner { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "liquidationDebt", skip_serializing_if = "Option::is_none")] pub liquidation_debt: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde( rename = "liquidationCollateralAmount", skip_serializing_if = "Option::is_none" )] pub liquidation_collateral_amount: Option, #[serde( rename = "returnCollateralAmount", skip_serializing_if = "Option::is_none" )] pub return_collateral_amount: Option, #[serde(rename = "liquidationFee", skip_serializing_if = "Option::is_none")] pub liquidation_fee: Option, #[serde( rename = "liquidationStartingPrice", skip_serializing_if = "Option::is_none" )] pub liquidation_starting_price: Option, #[serde( rename = "liquidationStartingTime", skip_serializing_if = "Option::is_none" )] pub liquidation_starting_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetFlexibleLoanLiquidationHistoryResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleLoanLiquidationHistoryResponseRowsInner { GetFlexibleLoanLiquidationHistoryResponseRowsInner { loan_coin: None, liquidation_debt: None, collateral_coin: None, liquidation_collateral_amount: None, return_collateral_amount: None, liquidation_fee: None, liquidation_starting_price: None, liquidation_starting_time: None, status: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_ltv_adjustment_history_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanLtvAdjustmentHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleLoanLtvAdjustmentHistoryResponse { #[must_use] pub fn new() -> GetFlexibleLoanLtvAdjustmentHistoryResponse { GetFlexibleLoanLtvAdjustmentHistoryResponse { rows: None, total: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_ltv_adjustment_history_response_rows_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "direction", skip_serializing_if = "Option::is_none")] pub direction: Option, #[serde(rename = "collateralAmount", skip_serializing_if = "Option::is_none")] pub collateral_amount: Option, #[serde(rename = "preLTV", skip_serializing_if = "Option::is_none")] pub pre_ltv: Option, #[serde(rename = "afterLTV", skip_serializing_if = "Option::is_none")] pub after_ltv: Option, #[serde(rename = "adjustTime", skip_serializing_if = "Option::is_none")] pub adjust_time: Option, } impl GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner { GetFlexibleLoanLtvAdjustmentHistoryResponseRowsInner { loan_coin: None, collateral_coin: None, direction: None, collateral_amount: None, pre_ltv: None, after_ltv: None, adjust_time: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_ongoing_orders_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanOngoingOrdersResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleLoanOngoingOrdersResponse { #[must_use] pub fn new() -> GetFlexibleLoanOngoingOrdersResponse { GetFlexibleLoanOngoingOrdersResponse { rows: None, total: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_ongoing_orders_response_rows_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanOngoingOrdersResponseRowsInner { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "totalDebt", skip_serializing_if = "Option::is_none")] pub total_debt: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "collateralAmount", skip_serializing_if = "Option::is_none")] pub collateral_amount: Option, #[serde(rename = "currentLTV", skip_serializing_if = "Option::is_none")] pub current_ltv: Option, } impl GetFlexibleLoanOngoingOrdersResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleLoanOngoingOrdersResponseRowsInner { GetFlexibleLoanOngoingOrdersResponseRowsInner { loan_coin: None, total_debt: None, collateral_coin: None, collateral_amount: None, current_ltv: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_repayment_history_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanRepaymentHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleLoanRepaymentHistoryResponse { #[must_use] pub fn new() -> GetFlexibleLoanRepaymentHistoryResponse { GetFlexibleLoanRepaymentHistoryResponse { rows: None, total: None, } } } src/crypto_loan/rest_api/models/get_flexible_loan_repayment_history_response_rows_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleLoanRepaymentHistoryResponseRowsInner { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "repayAmount", skip_serializing_if = "Option::is_none")] pub repay_amount: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "collateralReturn", skip_serializing_if = "Option::is_none")] pub collateral_return: Option, #[serde(rename = "repayStatus", skip_serializing_if = "Option::is_none")] pub repay_status: Option, #[serde(rename = "repayTime", skip_serializing_if = "Option::is_none")] pub repay_time: Option, } impl GetFlexibleLoanRepaymentHistoryResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleLoanRepaymentHistoryResponseRowsInner { GetFlexibleLoanRepaymentHistoryResponseRowsInner { loan_coin: None, repay_amount: None, collateral_coin: None, collateral_return: None, repay_status: None, repay_time: None, } } } src/crypto_loan/rest_api/models/get_loan_borrow_history_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLoanBorrowHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetLoanBorrowHistoryResponse { #[must_use] pub fn new() -> GetLoanBorrowHistoryResponse { GetLoanBorrowHistoryResponse { rows: None, total: None, } } } src/crypto_loan/rest_api/models/get_loan_borrow_history_response_rows_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLoanBorrowHistoryResponseRowsInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "initialLoanAmount", skip_serializing_if = "Option::is_none")] pub initial_loan_amount: Option, #[serde(rename = "hourlyInterestRate", skip_serializing_if = "Option::is_none")] pub hourly_interest_rate: Option, #[serde(rename = "loanTerm", skip_serializing_if = "Option::is_none")] pub loan_term: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde( rename = "initialCollateralAmount", skip_serializing_if = "Option::is_none" )] pub initial_collateral_amount: Option, #[serde(rename = "borrowTime", skip_serializing_if = "Option::is_none")] pub borrow_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetLoanBorrowHistoryResponseRowsInner { #[must_use] pub fn new() -> GetLoanBorrowHistoryResponseRowsInner { GetLoanBorrowHistoryResponseRowsInner { order_id: None, loan_coin: None, initial_loan_amount: None, hourly_interest_rate: None, loan_term: None, collateral_coin: None, initial_collateral_amount: None, borrow_time: None, status: None, } } } src/crypto_loan/rest_api/models/get_loan_ltv_adjustment_history_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLoanLtvAdjustmentHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetLoanLtvAdjustmentHistoryResponse { #[must_use] pub fn new() -> GetLoanLtvAdjustmentHistoryResponse { GetLoanLtvAdjustmentHistoryResponse { rows: None, total: None, } } } src/crypto_loan/rest_api/models/get_loan_ltv_adjustment_history_response_rows_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLoanLtvAdjustmentHistoryResponseRowsInner { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "direction", skip_serializing_if = "Option::is_none")] pub direction: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "preLTV", skip_serializing_if = "Option::is_none")] pub pre_ltv: Option, #[serde(rename = "afterLTV", skip_serializing_if = "Option::is_none")] pub after_ltv: Option, #[serde(rename = "adjustTime", skip_serializing_if = "Option::is_none")] pub adjust_time: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, } impl GetLoanLtvAdjustmentHistoryResponseRowsInner { #[must_use] pub fn new() -> GetLoanLtvAdjustmentHistoryResponseRowsInner { GetLoanLtvAdjustmentHistoryResponseRowsInner { loan_coin: None, collateral_coin: None, direction: None, amount: None, pre_ltv: None, after_ltv: None, adjust_time: None, order_id: None, } } } src/crypto_loan/rest_api/models/get_loan_repayment_history_response.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLoanRepaymentHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetLoanRepaymentHistoryResponse { #[must_use] pub fn new() -> GetLoanRepaymentHistoryResponse { GetLoanRepaymentHistoryResponse { rows: None, total: None, } } } src/crypto_loan/rest_api/models/get_loan_repayment_history_response_rows_inner.rs /* * Binance Crypto Loan REST API * * OpenAPI Specification for the Binance Crypto Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::crypto_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLoanRepaymentHistoryResponseRowsInner { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "repayAmount", skip_serializing_if = "Option::is_none")] pub repay_amount: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "collateralUsed", skip_serializing_if = "Option::is_none")] pub collateral_used: Option, #[serde(rename = "collateralReturn", skip_serializing_if = "Option::is_none")] pub collateral_return: Option, #[serde(rename = "repayType", skip_serializing_if = "Option::is_none")] pub repay_type: Option, #[serde(rename = "repayStatus", skip_serializing_if = "Option::is_none")] pub repay_status: Option, #[serde(rename = "repayTime", skip_serializing_if = "Option::is_none")] pub repay_time: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, } impl GetLoanRepaymentHistoryResponseRowsInner { #[must_use] pub fn new() -> GetLoanRepaymentHistoryResponseRowsInner { GetLoanRepaymentHistoryResponseRowsInner { loan_coin: None, repay_amount: None, collateral_coin: None, collateral_used: None, collateral_return: None, repay_type: None, repay_status: None, repay_time: None, order_id: None, } } } src/derivatives_trading_coin_futures/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_coin_futures/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_coin_futures/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi::production(configuration); match client.exchange_information().await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/derivatives_trading_coin_futures/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_coin_futures/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_coin_futures/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_coin_futures/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_coin_futures/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_coin_futures/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_coin_futures/docs/websocket_api/agent.md # WebSocket Agent Configuration ```rust use tokio_tungstenite::Connector; use native_tls::{TlsConnector, Protocol}; use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let native_tls = TlsConnector::builder() .min_protocol_version(Some(Protocol::Tlsv12)) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_coin_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_coin_futures/docs/websocket_api/certificate-pinning.md # WebSocket Agent Configuration ```rust use std::fs; use tokio_tungstenite::Connector; use native_tls::{Certificate, TlsConnector, Protocol}; use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let cert_pem = fs::read("/path/to/pinned_cert.pem")?; let cert = Certificate::from_pem(&cert_pem)?; let native_tls = TlsConnector::builder() .add_root_certificate(cert) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_coin_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_coin_futures/docs/websocket_api/connection-mode.md # Connection Mode Configuration ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .mode(models::WebsocketMode::Pool(3)) // Use pool mode with a pool size of 3 .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_coin_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_coin_futures/docs/websocket_api/key-pair-authentication.md # Private Key Configuration ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_coin_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_coin_futures/docs/websocket_api/reconnect-delay.md # Reconnect Delay Configuration ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .reconnect_delay(3000) // Set reconnect delay to 3 seconds .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_coin_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_coin_futures/docs/websocket_api/timeout.md # Timeout Configuration ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(10000) // Set timeout to 10 seconds .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_coin_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_coin_futures/docs/websocket_streams/agent.md # WebSocket Agent Configuration ```rust use tokio_tungstenite::Connector; use native_tls::{TlsConnector, Protocol}; use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let native_tls = TlsConnector::builder() .min_protocol_version(Some(Protocol::Tlsv12)) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_coin_futures::websocket_streams::AllBookTickersStreamParams::default(); let stream = connection.all_book_tickers_stream(params).await?; ``` src/derivatives_trading_coin_futures/docs/websocket_streams/certificate-pinning.md # WebSocket Agent Configuration ```rust use std::fs; use tokio_tungstenite::Connector; use native_tls::{Certificate, TlsConnector, Protocol}; use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let cert_pem = fs::read("/path/to/pinned_cert.pem")?; let cert = Certificate::from_pem(&cert_pem)?; let native_tls = TlsConnector::builder() .add_root_certificate(cert) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_coin_futures::websocket_streams::AllBookTickersStreamParams::default(); let stream = connection.all_book_tickers_stream(params).await?; ``` src/derivatives_trading_coin_futures/docs/websocket_streams/connection-mode.md # Connection Mode Configuration ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .mode(models::WebsocketMode::Pool(3)) // Use pool mode with a pool size of 3 .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_coin_futures::websocket_streams::AllBookTickersStreamParams::default(); let stream = connection.all_book_tickers_stream(params).await?; ``` src/derivatives_trading_coin_futures/docs/websocket_streams/reconnect-delay.md # Reconnect Delay Configuration ```rust use binance_sdk::derivatives_trading_coin_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .reconnect_delay(3000) // Set reconnect delay to 3 seconds .build()?; let client = derivatives_trading_coin_futures::DerivativesTradingCoinFuturesWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_coin_futures::websocket_streams::AllBookTickersStreamParams::default(); let stream = connection.all_book_tickers_stream(params).await?; ``` src/derivatives_trading_coin_futures/rest_api/apis/mod.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod market_data_api; pub use market_data_api::*; pub mod portfolio_margin_endpoints_api; pub use portfolio_margin_endpoints_api::*; pub mod trade_api; pub use trade_api::*; pub mod user_data_streams_api; pub use user_data_streams_api::*; src/derivatives_trading_coin_futures/rest_api/models/account_information_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponse { #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "positions", skip_serializing_if = "Option::is_none")] pub positions: Option>, #[serde(rename = "canDeposit", skip_serializing_if = "Option::is_none")] pub can_deposit: Option, #[serde(rename = "canTrade", skip_serializing_if = "Option::is_none")] pub can_trade: Option, #[serde(rename = "canWithdraw", skip_serializing_if = "Option::is_none")] pub can_withdraw: Option, #[serde(rename = "feeTier", skip_serializing_if = "Option::is_none")] pub fee_tier: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountInformationResponse { #[must_use] pub fn new() -> AccountInformationResponse { AccountInformationResponse { assets: None, positions: None, can_deposit: None, can_trade: None, can_withdraw: None, fee_tier: None, update_time: None, } } } src/derivatives_trading_coin_futures/rest_api/models/account_information_response_assets_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponseAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountInformationResponseAssetsInner { #[must_use] pub fn new() -> AccountInformationResponseAssetsInner { AccountInformationResponseAssetsInner { asset: None, wallet_balance: None, unrealized_profit: None, margin_balance: None, maint_margin: None, initial_margin: None, position_initial_margin: None, open_order_initial_margin: None, max_withdraw_amount: None, cross_wallet_balance: None, cross_un_pnl: None, available_balance: None, update_time: None, } } } src/derivatives_trading_coin_futures/rest_api/models/account_information_response_positions_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponsePositionsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "isolated", skip_serializing_if = "Option::is_none")] pub isolated: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "breakEvenPrice", skip_serializing_if = "Option::is_none")] pub break_even_price: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "notionalValue", skip_serializing_if = "Option::is_none")] pub notional_value: Option, } impl AccountInformationResponsePositionsInner { #[must_use] pub fn new() -> AccountInformationResponsePositionsInner { AccountInformationResponsePositionsInner { symbol: None, position_amt: None, initial_margin: None, maint_margin: None, unrealized_profit: None, position_initial_margin: None, open_order_initial_margin: None, leverage: None, isolated: None, position_side: None, entry_price: None, break_even_price: None, max_qty: None, update_time: None, notional_value: None, } } } src/derivatives_trading_coin_futures/rest_api/models/account_trade_list_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountTradeListResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "realizedPnl", skip_serializing_if = "Option::is_none")] pub realized_pnl: Option, #[serde(rename = "marginAsset", skip_serializing_if = "Option::is_none")] pub margin_asset: Option, #[serde(rename = "baseQty", skip_serializing_if = "Option::is_none")] pub base_qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, } impl AccountTradeListResponseInner { #[must_use] pub fn new() -> AccountTradeListResponseInner { AccountTradeListResponseInner { symbol: None, id: None, order_id: None, pair: None, side: None, price: None, qty: None, realized_pnl: None, margin_asset: None, base_qty: None, commission: None, commission_asset: None, time: None, position_side: None, buyer: None, maker: None, } } } src/derivatives_trading_coin_futures/rest_api/models/basis_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct BasisResponseInner { #[serde(rename = "indexPrice", skip_serializing_if = "Option::is_none")] pub index_price: Option, #[serde(rename = "contractType", skip_serializing_if = "Option::is_none")] pub contract_type: Option, #[serde(rename = "basisRate", skip_serializing_if = "Option::is_none")] pub basis_rate: Option, #[serde(rename = "futuresPrice", skip_serializing_if = "Option::is_none")] pub futures_price: Option, #[serde( rename = "annualizedBasisRate", skip_serializing_if = "Option::is_none" )] pub annualized_basis_rate: Option, #[serde(rename = "basis", skip_serializing_if = "Option::is_none")] pub basis: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl BasisResponseInner { #[must_use] pub fn new() -> BasisResponseInner { BasisResponseInner { index_price: None, contract_type: None, basis_rate: None, futures_price: None, annualized_basis_rate: None, basis: None, pair: None, timestamp: None, } } } src/derivatives_trading_coin_futures/rest_api/models/cancel_all_open_orders_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAllOpenOrdersResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAllOpenOrdersResponse { #[must_use] pub fn new() -> CancelAllOpenOrdersResponse { CancelAllOpenOrdersResponse { code: None, msg: None, } } } src/derivatives_trading_coin_futures/rest_api/models/change_initial_leverage_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeInitialLeverageResponse { #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, } impl ChangeInitialLeverageResponse { #[must_use] pub fn new() -> ChangeInitialLeverageResponse { ChangeInitialLeverageResponse { leverage: None, max_qty: None, symbol: None, } } } src/derivatives_trading_coin_futures/rest_api/models/change_margin_type_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeMarginTypeResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ChangeMarginTypeResponse { #[must_use] pub fn new() -> ChangeMarginTypeResponse { ChangeMarginTypeResponse { code: None, msg: None, } } } src/derivatives_trading_coin_futures/rest_api/models/change_position_mode_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangePositionModeResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ChangePositionModeResponse { #[must_use] pub fn new() -> ChangePositionModeResponse { ChangePositionModeResponse { code: None, msg: None, } } } src/derivatives_trading_coin_futures/rest_api/models/check_server_time_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckServerTimeResponse { #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, } impl CheckServerTimeResponse { #[must_use] pub fn new() -> CheckServerTimeResponse { CheckServerTimeResponse { server_time: None } } } src/derivatives_trading_coin_futures/rest_api/models/classic_portfolio_margin_account_information_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ClassicPortfolioMarginAccountInformationResponse { #[serde( rename = "maxWithdrawAmountUSD", skip_serializing_if = "Option::is_none" )] pub max_withdraw_amount_usd: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, } impl ClassicPortfolioMarginAccountInformationResponse { #[must_use] pub fn new() -> ClassicPortfolioMarginAccountInformationResponse { ClassicPortfolioMarginAccountInformationResponse { max_withdraw_amount_usd: None, asset: None, max_withdraw_amount: None, } } } src/derivatives_trading_coin_futures/rest_api/models/compressed_aggregate_trades_list_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CompressedAggregateTradesListResponseInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, } impl CompressedAggregateTradesListResponseInner { #[must_use] pub fn new() -> CompressedAggregateTradesListResponseInner { CompressedAggregateTradesListResponseInner { a: None, p: None, q: None, f: None, l: None, t_uppercase: None, m: None, } } } src/derivatives_trading_coin_futures/rest_api/models/continuous_contract_kline_candlestick_data_response_item_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ContinuousContractKlineCandlestickDataResponseItemInner { Integer(i64), String(String), Other(serde_json::Value), } impl Default for ContinuousContractKlineCandlestickDataResponseItemInner { fn default() -> Self { Self::Integer(Default::default()) } } src/derivatives_trading_coin_futures/rest_api/models/exchange_information_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponse { #[serde(rename = "exchangeFilters", skip_serializing_if = "Option::is_none")] pub exchange_filters: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")] pub symbols: Option>, #[serde(rename = "timezone", skip_serializing_if = "Option::is_none")] pub timezone: Option, } impl ExchangeInformationResponse { #[must_use] pub fn new() -> ExchangeInformationResponse { ExchangeInformationResponse { exchange_filters: None, rate_limits: None, server_time: None, symbols: None, timezone: None, } } } src/derivatives_trading_coin_futures/rest_api/models/exchange_information_response_rate_limits_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponseRateLimitsInner { #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, } impl ExchangeInformationResponseRateLimitsInner { #[must_use] pub fn new() -> ExchangeInformationResponseRateLimitsInner { ExchangeInformationResponseRateLimitsInner { interval: None, interval_num: None, limit: None, rate_limit_type: None, } } } src/derivatives_trading_coin_futures/rest_api/models/exchange_information_response_symbols_inner_filters_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponseSymbolsInnerFiltersInner { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxPrice", skip_serializing_if = "Option::is_none")] pub max_price: Option, #[serde(rename = "minPrice", skip_serializing_if = "Option::is_none")] pub min_price: Option, #[serde(rename = "tickSize", skip_serializing_if = "Option::is_none")] pub tick_size: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "minQty", skip_serializing_if = "Option::is_none")] pub min_qty: Option, #[serde(rename = "stepSize", skip_serializing_if = "Option::is_none")] pub step_size: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "multiplierUp", skip_serializing_if = "Option::is_none")] pub multiplier_up: Option, #[serde(rename = "multiplierDown", skip_serializing_if = "Option::is_none")] pub multiplier_down: Option, #[serde(rename = "multiplierDecimal", skip_serializing_if = "Option::is_none")] pub multiplier_decimal: Option, } impl ExchangeInformationResponseSymbolsInnerFiltersInner { #[must_use] pub fn new() -> ExchangeInformationResponseSymbolsInnerFiltersInner { ExchangeInformationResponseSymbolsInnerFiltersInner { filter_type: None, max_price: None, min_price: None, tick_size: None, max_qty: None, min_qty: None, step_size: None, limit: None, multiplier_up: None, multiplier_down: None, multiplier_decimal: None, } } } src/derivatives_trading_coin_futures/rest_api/models/futures_account_balance_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesAccountBalanceResponseInner { #[serde(rename = "accountAlias", skip_serializing_if = "Option::is_none")] pub account_alias: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "balance", skip_serializing_if = "Option::is_none")] pub balance: Option, #[serde(rename = "withdrawAvailable", skip_serializing_if = "Option::is_none")] pub withdraw_available: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl FuturesAccountBalanceResponseInner { #[must_use] pub fn new() -> FuturesAccountBalanceResponseInner { FuturesAccountBalanceResponseInner { account_alias: None, asset: None, balance: None, withdraw_available: None, cross_wallet_balance: None, cross_un_pnl: None, available_balance: None, update_time: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_current_position_mode_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCurrentPositionModeResponse { #[serde(rename = "dualSidePosition", skip_serializing_if = "Option::is_none")] pub dual_side_position: Option, } impl GetCurrentPositionModeResponse { #[must_use] pub fn new() -> GetCurrentPositionModeResponse { GetCurrentPositionModeResponse { dual_side_position: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_download_id_for_futures_order_history_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDownloadIdForFuturesOrderHistoryResponse { #[serde( rename = "avgCostTimestampOfLast30d", skip_serializing_if = "Option::is_none" )] pub avg_cost_timestamp_of_last30d: Option, #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, } impl GetDownloadIdForFuturesOrderHistoryResponse { #[must_use] pub fn new() -> GetDownloadIdForFuturesOrderHistoryResponse { GetDownloadIdForFuturesOrderHistoryResponse { avg_cost_timestamp_of_last30d: None, download_id: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_download_id_for_futures_trade_history_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDownloadIdForFuturesTradeHistoryResponse { #[serde( rename = "avgCostTimestampOfLast30d", skip_serializing_if = "Option::is_none" )] pub avg_cost_timestamp_of_last30d: Option, #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, } impl GetDownloadIdForFuturesTradeHistoryResponse { #[must_use] pub fn new() -> GetDownloadIdForFuturesTradeHistoryResponse { GetDownloadIdForFuturesTradeHistoryResponse { avg_cost_timestamp_of_last30d: None, download_id: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_download_id_for_futures_transaction_history_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDownloadIdForFuturesTransactionHistoryResponse { #[serde( rename = "avgCostTimestampOfLast30d", skip_serializing_if = "Option::is_none" )] pub avg_cost_timestamp_of_last30d: Option, #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, } impl GetDownloadIdForFuturesTransactionHistoryResponse { #[must_use] pub fn new() -> GetDownloadIdForFuturesTransactionHistoryResponse { GetDownloadIdForFuturesTransactionHistoryResponse { avg_cost_timestamp_of_last30d: None, download_id: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_funding_rate_history_of_perpetual_futures_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFundingRateHistoryOfPerpetualFuturesResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "fundingTime", skip_serializing_if = "Option::is_none")] pub funding_time: Option, #[serde(rename = "fundingRate", skip_serializing_if = "Option::is_none")] pub funding_rate: Option, } impl GetFundingRateHistoryOfPerpetualFuturesResponseInner { #[must_use] pub fn new() -> GetFundingRateHistoryOfPerpetualFuturesResponseInner { GetFundingRateHistoryOfPerpetualFuturesResponseInner { symbol: None, funding_time: None, funding_rate: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_funding_rate_info_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFundingRateInfoResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde( rename = "adjustedFundingRateCap", skip_serializing_if = "Option::is_none" )] pub adjusted_funding_rate_cap: Option, #[serde( rename = "adjustedFundingRateFloor", skip_serializing_if = "Option::is_none" )] pub adjusted_funding_rate_floor: Option, #[serde( rename = "fundingIntervalHours", skip_serializing_if = "Option::is_none" )] pub funding_interval_hours: Option, #[serde(rename = "disclaimer", skip_serializing_if = "Option::is_none")] pub disclaimer: Option, } impl GetFundingRateInfoResponseInner { #[must_use] pub fn new() -> GetFundingRateInfoResponseInner { GetFundingRateInfoResponseInner { symbol: None, adjusted_funding_rate_cap: None, adjusted_funding_rate_floor: None, funding_interval_hours: None, disclaimer: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_futures_order_history_download_link_by_id_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesOrderHistoryDownloadLinkByIdResponse { #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "notified", skip_serializing_if = "Option::is_none")] pub notified: Option, #[serde( rename = "expirationTimestamp", skip_serializing_if = "Option::is_none" )] pub expiration_timestamp: Option, #[serde(rename = "isExpired", skip_serializing_if = "Option::is_none")] pub is_expired: Option, } impl GetFuturesOrderHistoryDownloadLinkByIdResponse { #[must_use] pub fn new() -> GetFuturesOrderHistoryDownloadLinkByIdResponse { GetFuturesOrderHistoryDownloadLinkByIdResponse { download_id: None, status: None, url: None, notified: None, expiration_timestamp: None, is_expired: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_futures_trade_download_link_by_id_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesTradeDownloadLinkByIdResponse { #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "notified", skip_serializing_if = "Option::is_none")] pub notified: Option, #[serde( rename = "expirationTimestamp", skip_serializing_if = "Option::is_none" )] pub expiration_timestamp: Option, #[serde(rename = "isExpired", skip_serializing_if = "Option::is_none")] pub is_expired: Option, } impl GetFuturesTradeDownloadLinkByIdResponse { #[must_use] pub fn new() -> GetFuturesTradeDownloadLinkByIdResponse { GetFuturesTradeDownloadLinkByIdResponse { download_id: None, status: None, url: None, notified: None, expiration_timestamp: None, is_expired: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_futures_transaction_history_download_link_by_id_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesTransactionHistoryDownloadLinkByIdResponse { #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "notified", skip_serializing_if = "Option::is_none")] pub notified: Option, #[serde( rename = "expirationTimestamp", skip_serializing_if = "Option::is_none" )] pub expiration_timestamp: Option, #[serde(rename = "isExpired", skip_serializing_if = "Option::is_none")] pub is_expired: Option, } impl GetFuturesTransactionHistoryDownloadLinkByIdResponse { #[must_use] pub fn new() -> GetFuturesTransactionHistoryDownloadLinkByIdResponse { GetFuturesTransactionHistoryDownloadLinkByIdResponse { download_id: None, status: None, url: None, notified: None, expiration_timestamp: None, is_expired: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_income_history_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetIncomeHistoryResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "incomeType", skip_serializing_if = "Option::is_none")] pub income_type: Option, #[serde(rename = "income", skip_serializing_if = "Option::is_none")] pub income: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, } impl GetIncomeHistoryResponseInner { #[must_use] pub fn new() -> GetIncomeHistoryResponseInner { GetIncomeHistoryResponseInner { symbol: None, income_type: None, income: None, asset: None, info: None, time: None, tran_id: None, trade_id: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_order_modify_history_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderModifyHistoryResponseInner { #[serde(rename = "amendmentId", skip_serializing_if = "Option::is_none")] pub amendment_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "amendment", skip_serializing_if = "Option::is_none")] pub amendment: Option>, } impl GetOrderModifyHistoryResponseInner { #[must_use] pub fn new() -> GetOrderModifyHistoryResponseInner { GetOrderModifyHistoryResponseInner { amendment_id: None, symbol: None, pair: None, order_id: None, client_order_id: None, time: None, amendment: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_order_modify_history_response_inner_amendment.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderModifyHistoryResponseInnerAmendment { #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option>, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option>, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl GetOrderModifyHistoryResponseInnerAmendment { #[must_use] pub fn new() -> GetOrderModifyHistoryResponseInnerAmendment { GetOrderModifyHistoryResponseInnerAmendment { price: None, orig_qty: None, count: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_order_modify_history_response_inner_amendment_orig_qty.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderModifyHistoryResponseInnerAmendmentOrigQty { #[serde(rename = "before", skip_serializing_if = "Option::is_none")] pub before: Option, #[serde(rename = "after", skip_serializing_if = "Option::is_none")] pub after: Option, } impl GetOrderModifyHistoryResponseInnerAmendmentOrigQty { #[must_use] pub fn new() -> GetOrderModifyHistoryResponseInnerAmendmentOrigQty { GetOrderModifyHistoryResponseInnerAmendmentOrigQty { before: None, after: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_order_modify_history_response_inner_amendment_price.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderModifyHistoryResponseInnerAmendmentPrice { #[serde(rename = "before", skip_serializing_if = "Option::is_none")] pub before: Option, #[serde(rename = "after", skip_serializing_if = "Option::is_none")] pub after: Option, } impl GetOrderModifyHistoryResponseInnerAmendmentPrice { #[must_use] pub fn new() -> GetOrderModifyHistoryResponseInnerAmendmentPrice { GetOrderModifyHistoryResponseInnerAmendmentPrice { before: None, after: None, } } } src/derivatives_trading_coin_futures/rest_api/models/get_position_margin_change_history_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPositionMarginChangeHistoryResponseInner { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, } impl GetPositionMarginChangeHistoryResponseInner { #[must_use] pub fn new() -> GetPositionMarginChangeHistoryResponseInner { GetPositionMarginChangeHistoryResponseInner { amount: None, asset: None, symbol: None, time: None, r#type: None, position_side: None, } } } src/derivatives_trading_coin_futures/rest_api/models/index_price_and_mark_price_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndexPriceAndMarkPriceResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "indexPrice", skip_serializing_if = "Option::is_none")] pub index_price: Option, #[serde( rename = "estimatedSettlePrice", skip_serializing_if = "Option::is_none" )] pub estimated_settle_price: Option, #[serde(rename = "lastFundingRate", skip_serializing_if = "Option::is_none")] pub last_funding_rate: Option, #[serde(rename = "interestRate", skip_serializing_if = "Option::is_none")] pub interest_rate: Option, #[serde(rename = "nextFundingTime", skip_serializing_if = "Option::is_none")] pub next_funding_time: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl IndexPriceAndMarkPriceResponseInner { #[must_use] pub fn new() -> IndexPriceAndMarkPriceResponseInner { IndexPriceAndMarkPriceResponseInner { symbol: None, pair: None, mark_price: None, index_price: None, estimated_settle_price: None, last_funding_rate: None, interest_rate: None, next_funding_time: None, time: None, } } } src/derivatives_trading_coin_futures/rest_api/models/index_price_kline_candlestick_data_response_item_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IndexPriceKlineCandlestickDataResponseItemInner { Integer(i64), String(String), Other(serde_json::Value), } impl Default for IndexPriceKlineCandlestickDataResponseItemInner { fn default() -> Self { Self::Integer(Default::default()) } } src/derivatives_trading_coin_futures/rest_api/models/long_short_ratio_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct LongShortRatioResponseInner { #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "longShortRatio", skip_serializing_if = "Option::is_none")] pub long_short_ratio: Option, #[serde(rename = "longAccount", skip_serializing_if = "Option::is_none")] pub long_account: Option, #[serde(rename = "shortAccount", skip_serializing_if = "Option::is_none")] pub short_account: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl LongShortRatioResponseInner { #[must_use] pub fn new() -> LongShortRatioResponseInner { LongShortRatioResponseInner { pair: None, long_short_ratio: None, long_account: None, short_account: None, timestamp: None, } } } src/derivatives_trading_coin_futures/rest_api/models/mark_price_kline_candlestick_data_response_item_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum MarkPriceKlineCandlestickDataResponseItemInner { Integer(i64), String(String), Other(serde_json::Value), } impl Default for MarkPriceKlineCandlestickDataResponseItemInner { fn default() -> Self { Self::Integer(Default::default()) } } src/derivatives_trading_coin_futures/rest_api/models/modify_isolated_position_margin_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ModifyIsolatedPositionMarginResponse { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, } impl ModifyIsolatedPositionMarginResponse { #[must_use] pub fn new() -> ModifyIsolatedPositionMarginResponse { ModifyIsolatedPositionMarginResponse { amount: None, code: None, msg: None, r#type: None, } } } src/derivatives_trading_coin_futures/rest_api/models/modify_multiple_orders_batch_orders_parameter_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ModifyMultipleOrdersBatchOrdersParameterInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "recvWindow", skip_serializing_if = "Option::is_none")] pub recv_window: Option, } impl ModifyMultipleOrdersBatchOrdersParameterInner { #[must_use] pub fn new() -> ModifyMultipleOrdersBatchOrdersParameterInner { ModifyMultipleOrdersBatchOrdersParameterInner { order_id: None, orig_client_order_id: None, symbol: None, side: None, quantity: None, price: None, recv_window: None, } } } /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum SideEnum { #[serde(rename = "BUY")] Buy, #[serde(rename = "SELL")] Sell, } impl Default for SideEnum { fn default() -> SideEnum { Self::Buy } } src/derivatives_trading_coin_futures/rest_api/models/notional_bracket_for_pair_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NotionalBracketForPairResponseInner { #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "brackets", skip_serializing_if = "Option::is_none")] pub brackets: Option>, } impl NotionalBracketForPairResponseInner { #[must_use] pub fn new() -> NotionalBracketForPairResponseInner { NotionalBracketForPairResponseInner { pair: None, brackets: None, } } } src/derivatives_trading_coin_futures/rest_api/models/notional_bracket_for_pair_response_inner_brackets_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NotionalBracketForPairResponseInnerBracketsInner { #[serde(rename = "bracket", skip_serializing_if = "Option::is_none")] pub bracket: Option, #[serde(rename = "initialLeverage", skip_serializing_if = "Option::is_none")] pub initial_leverage: Option, #[serde(rename = "qtyCap", skip_serializing_if = "Option::is_none")] pub qty_cap: Option, #[serde(rename = "qtylFloor", skip_serializing_if = "Option::is_none")] pub qtyl_floor: Option, #[serde(rename = "maintMarginRatio", skip_serializing_if = "Option::is_none")] pub maint_margin_ratio: Option, #[serde(rename = "cum", skip_serializing_if = "Option::is_none")] pub cum: Option, } impl NotionalBracketForPairResponseInnerBracketsInner { #[must_use] pub fn new() -> NotionalBracketForPairResponseInnerBracketsInner { NotionalBracketForPairResponseInnerBracketsInner { bracket: None, initial_leverage: None, qty_cap: None, qtyl_floor: None, maint_margin_ratio: None, cum: None, } } } src/derivatives_trading_coin_futures/rest_api/models/notional_bracket_for_symbol_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NotionalBracketForSymbolResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "notionalCoef", skip_serializing_if = "Option::is_none")] pub notional_coef: Option, #[serde(rename = "brackets", skip_serializing_if = "Option::is_none")] pub brackets: Option>, } impl NotionalBracketForSymbolResponseInner { #[must_use] pub fn new() -> NotionalBracketForSymbolResponseInner { NotionalBracketForSymbolResponseInner { symbol: None, notional_coef: None, brackets: None, } } } src/derivatives_trading_coin_futures/rest_api/models/old_trades_lookup_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OldTradesLookupResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "baseQty", skip_serializing_if = "Option::is_none")] pub base_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyerMaker", skip_serializing_if = "Option::is_none")] pub is_buyer_maker: Option, } impl OldTradesLookupResponseInner { #[must_use] pub fn new() -> OldTradesLookupResponseInner { OldTradesLookupResponseInner { id: None, price: None, qty: None, base_qty: None, time: None, is_buyer_maker: None, } } } src/derivatives_trading_coin_futures/rest_api/models/open_interest_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenInterestResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "openInterest", skip_serializing_if = "Option::is_none")] pub open_interest: Option, #[serde(rename = "contractType", skip_serializing_if = "Option::is_none")] pub contract_type: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl OpenInterestResponse { #[must_use] pub fn new() -> OpenInterestResponse { OpenInterestResponse { symbol: None, pair: None, open_interest: None, contract_type: None, time: None, } } } src/derivatives_trading_coin_futures/rest_api/models/open_interest_statistics_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenInterestStatisticsResponseInner { #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "contractType", skip_serializing_if = "Option::is_none")] pub contract_type: Option, #[serde(rename = "sumOpenInterest", skip_serializing_if = "Option::is_none")] pub sum_open_interest: Option, #[serde( rename = "sumOpenInterestValue", skip_serializing_if = "Option::is_none" )] pub sum_open_interest_value: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl OpenInterestStatisticsResponseInner { #[must_use] pub fn new() -> OpenInterestStatisticsResponseInner { OpenInterestStatisticsResponseInner { pair: None, contract_type: None, sum_open_interest: None, sum_open_interest_value: None, timestamp: None, } } } src/derivatives_trading_coin_futures/rest_api/models/order_book_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderBookResponse { #[serde(rename = "lastUpdateId", skip_serializing_if = "Option::is_none")] pub last_update_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "bids", skip_serializing_if = "Option::is_none")] pub bids: Option>>, #[serde(rename = "asks", skip_serializing_if = "Option::is_none")] pub asks: Option>>, } impl OrderBookResponse { #[must_use] pub fn new() -> OrderBookResponse { OrderBookResponse { last_update_id: None, symbol: None, pair: None, e_uppercase: None, t_uppercase: None, bids: None, asks: None, } } } src/derivatives_trading_coin_futures/rest_api/models/position_adl_quantile_estimation_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionAdlQuantileEstimationResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "adlQuantile", skip_serializing_if = "Option::is_none")] pub adl_quantile: Option>, } impl PositionAdlQuantileEstimationResponseInner { #[must_use] pub fn new() -> PositionAdlQuantileEstimationResponseInner { PositionAdlQuantileEstimationResponseInner { symbol: None, adl_quantile: None, } } } src/derivatives_trading_coin_futures/rest_api/models/position_adl_quantile_estimation_response_inner_adl_quantile.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionAdlQuantileEstimationResponseInnerAdlQuantile { #[serde(rename = "LONG", skip_serializing_if = "Option::is_none")] pub long: Option, #[serde(rename = "SHORT", skip_serializing_if = "Option::is_none")] pub short: Option, #[serde(rename = "HEDGE", skip_serializing_if = "Option::is_none")] pub hedge: Option, #[serde(rename = "BOTH", skip_serializing_if = "Option::is_none")] pub both: Option, } impl PositionAdlQuantileEstimationResponseInnerAdlQuantile { #[must_use] pub fn new() -> PositionAdlQuantileEstimationResponseInnerAdlQuantile { PositionAdlQuantileEstimationResponseInnerAdlQuantile { long: None, short: None, hedge: None, both: None, } } } src/derivatives_trading_coin_futures/rest_api/models/position_information_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionInformationResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "breakEvenPrice", skip_serializing_if = "Option::is_none")] pub break_even_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "unRealizedProfit", skip_serializing_if = "Option::is_none")] pub un_realized_profit: Option, #[serde(rename = "liquidationPrice", skip_serializing_if = "Option::is_none")] pub liquidation_price: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "marginType", skip_serializing_if = "Option::is_none")] pub margin_type: Option, #[serde(rename = "isolatedMargin", skip_serializing_if = "Option::is_none")] pub isolated_margin: Option, #[serde(rename = "isAutoAddMargin", skip_serializing_if = "Option::is_none")] pub is_auto_add_margin: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl PositionInformationResponseInner { #[must_use] pub fn new() -> PositionInformationResponseInner { PositionInformationResponseInner { symbol: None, position_amt: None, entry_price: None, break_even_price: None, mark_price: None, un_realized_profit: None, liquidation_price: None, leverage: None, max_qty: None, margin_type: None, isolated_margin: None, is_auto_add_margin: None, position_side: None, update_time: None, } } } src/derivatives_trading_coin_futures/rest_api/models/premium_index_kline_data_response_item_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum PremiumIndexKlineDataResponseItemInner { Integer(i64), String(String), Other(serde_json::Value), } impl Default for PremiumIndexKlineDataResponseItemInner { fn default() -> Self { Self::Integer(Default::default()) } } src/derivatives_trading_coin_futures/rest_api/models/query_index_price_constituents_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIndexPriceConstituentsResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "constituents", skip_serializing_if = "Option::is_none")] pub constituents: Option>, } impl QueryIndexPriceConstituentsResponse { #[must_use] pub fn new() -> QueryIndexPriceConstituentsResponse { QueryIndexPriceConstituentsResponse { symbol: None, time: None, constituents: None, } } } src/derivatives_trading_coin_futures/rest_api/models/query_index_price_constituents_response_constituents_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIndexPriceConstituentsResponseConstituentsInner { #[serde(rename = "exchange", skip_serializing_if = "Option::is_none")] pub exchange: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, } impl QueryIndexPriceConstituentsResponseConstituentsInner { #[must_use] pub fn new() -> QueryIndexPriceConstituentsResponseConstituentsInner { QueryIndexPriceConstituentsResponseConstituentsInner { exchange: None, symbol: None, } } } src/derivatives_trading_coin_futures/rest_api/models/recent_trades_list_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RecentTradesListResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "baseQty", skip_serializing_if = "Option::is_none")] pub base_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyerMaker", skip_serializing_if = "Option::is_none")] pub is_buyer_maker: Option, } impl RecentTradesListResponseInner { #[must_use] pub fn new() -> RecentTradesListResponseInner { RecentTradesListResponseInner { id: None, price: None, qty: None, base_qty: None, time: None, is_buyer_maker: None, } } } src/derivatives_trading_coin_futures/rest_api/models/start_user_data_stream_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StartUserDataStreamResponse { #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl StartUserDataStreamResponse { #[must_use] pub fn new() -> StartUserDataStreamResponse { StartUserDataStreamResponse { listen_key: None } } } src/derivatives_trading_coin_futures/rest_api/models/symbol_order_book_ticker_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolOrderBookTickerResponseInner { #[serde(rename = "lastUpdateId", skip_serializing_if = "Option::is_none")] pub last_update_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "bidQty", skip_serializing_if = "Option::is_none")] pub bid_qty: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "askQty", skip_serializing_if = "Option::is_none")] pub ask_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl SymbolOrderBookTickerResponseInner { #[must_use] pub fn new() -> SymbolOrderBookTickerResponseInner { SymbolOrderBookTickerResponseInner { last_update_id: None, symbol: None, pair: None, bid_price: None, bid_qty: None, ask_price: None, ask_qty: None, time: None, } } } src/derivatives_trading_coin_futures/rest_api/models/symbol_price_ticker_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolPriceTickerResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl SymbolPriceTickerResponseInner { #[must_use] pub fn new() -> SymbolPriceTickerResponseInner { SymbolPriceTickerResponseInner { symbol: None, ps: None, price: None, time: None, } } } src/derivatives_trading_coin_futures/rest_api/models/taker_buy_sell_volume_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TakerBuySellVolumeResponseInner { #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "contractType", skip_serializing_if = "Option::is_none")] pub contract_type: Option, #[serde(rename = "takerBuyVol", skip_serializing_if = "Option::is_none")] pub taker_buy_vol: Option, #[serde(rename = "takerSellVol", skip_serializing_if = "Option::is_none")] pub taker_sell_vol: Option, #[serde(rename = "takerBuyVolValue", skip_serializing_if = "Option::is_none")] pub taker_buy_vol_value: Option, #[serde(rename = "takerSellVolValue", skip_serializing_if = "Option::is_none")] pub taker_sell_vol_value: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl TakerBuySellVolumeResponseInner { #[must_use] pub fn new() -> TakerBuySellVolumeResponseInner { TakerBuySellVolumeResponseInner { pair: None, contract_type: None, taker_buy_vol: None, taker_sell_vol: None, taker_buy_vol_value: None, taker_sell_vol_value: None, timestamp: None, } } } src/derivatives_trading_coin_futures/rest_api/models/ticker24hr_price_change_statistics_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Ticker24hrPriceChangeStatisticsResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "lastQty", skip_serializing_if = "Option::is_none")] pub last_qty: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "baseVolume", skip_serializing_if = "Option::is_none")] pub base_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl Ticker24hrPriceChangeStatisticsResponseInner { #[must_use] pub fn new() -> Ticker24hrPriceChangeStatisticsResponseInner { Ticker24hrPriceChangeStatisticsResponseInner { symbol: None, pair: None, price_change: None, price_change_percent: None, weighted_avg_price: None, last_price: None, last_qty: None, open_price: None, high_price: None, low_price: None, volume: None, base_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/derivatives_trading_coin_futures/rest_api/models/top_trader_long_short_ratio_accounts_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TopTraderLongShortRatioAccountsResponseInner { #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "longShortRatio", skip_serializing_if = "Option::is_none")] pub long_short_ratio: Option, #[serde(rename = "longAccount", skip_serializing_if = "Option::is_none")] pub long_account: Option, #[serde(rename = "shortAccount", skip_serializing_if = "Option::is_none")] pub short_account: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl TopTraderLongShortRatioAccountsResponseInner { #[must_use] pub fn new() -> TopTraderLongShortRatioAccountsResponseInner { TopTraderLongShortRatioAccountsResponseInner { pair: None, long_short_ratio: None, long_account: None, short_account: None, timestamp: None, } } } src/derivatives_trading_coin_futures/rest_api/models/top_trader_long_short_ratio_positions_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TopTraderLongShortRatioPositionsResponseInner { #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "longShortRatio", skip_serializing_if = "Option::is_none")] pub long_short_ratio: Option, #[serde(rename = "longPosition", skip_serializing_if = "Option::is_none")] pub long_position: Option, #[serde(rename = "shortPosition", skip_serializing_if = "Option::is_none")] pub short_position: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl TopTraderLongShortRatioPositionsResponseInner { #[must_use] pub fn new() -> TopTraderLongShortRatioPositionsResponseInner { TopTraderLongShortRatioPositionsResponseInner { pair: None, long_short_ratio: None, long_position: None, short_position: None, timestamp: None, } } } src/derivatives_trading_coin_futures/rest_api/models/user_commission_rate_response.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UserCommissionRateResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde( rename = "makerCommissionRate", skip_serializing_if = "Option::is_none" )] pub maker_commission_rate: Option, #[serde( rename = "takerCommissionRate", skip_serializing_if = "Option::is_none" )] pub taker_commission_rate: Option, } impl UserCommissionRateResponse { #[must_use] pub fn new() -> UserCommissionRateResponse { UserCommissionRateResponse { symbol: None, maker_commission_rate: None, taker_commission_rate: None, } } } src/derivatives_trading_coin_futures/rest_api/models/users_force_orders_response_inner.rs /* * Binance Derivatives Trading COIN Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UsersForceOrdersResponseInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "closePosition", skip_serializing_if = "Option::is_none")] pub close_position: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "workingType", skip_serializing_if = "Option::is_none")] pub working_type: Option, #[serde(rename = "priceProtect", skip_serializing_if = "Option::is_none")] pub price_protect: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl UsersForceOrdersResponseInner { #[must_use] pub fn new() -> UsersForceOrdersResponseInner { UsersForceOrdersResponseInner { order_id: None, symbol: None, pair: None, status: None, client_order_id: None, price: None, avg_price: None, orig_qty: None, executed_qty: None, cum_base: None, time_in_force: None, r#type: None, reduce_only: None, close_position: None, side: None, position_side: None, stop_price: None, working_type: None, price_protect: None, orig_type: None, time: None, update_time: None, } } } src/derivatives_trading_coin_futures/websocket_api/apis/mod.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod trade_api; pub use trade_api::*; pub mod user_data_streams_api; pub use user_data_streams_api::*; src/derivatives_trading_coin_futures/websocket_api/handle.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ use crate::{common::config::ConfigurationWebsocketApi, models::WebsocketApiConnectConfig}; use super::WebsocketApi; #[derive(Clone)] pub struct WebsocketApiHandle { configuration: ConfigurationWebsocketApi, } impl WebsocketApiHandle { pub fn new(configuration: ConfigurationWebsocketApi) -> Self { Self { configuration } } /// Connects to the WebSocket API using default configuration. /// /// # Returns /// /// A `Result` containing the connected `WebsocketApi` instance if successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// pub async fn connect(&self) -> anyhow::Result { self.connect_with_config(Default::default()).await } /// Connects to the WebSocket API with a custom configuration. /// /// # Arguments /// /// * `cfg` - A configuration object specifying connection parameters. /// /// # Returns /// /// A `Result` containing the connected `WebsocketApi` instance if successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// pub async fn connect_with_config( &self, cfg: WebsocketApiConnectConfig, ) -> anyhow::Result { WebsocketApi::connect(self.configuration.clone(), cfg.mode).await } } src/derivatives_trading_coin_futures/websocket_api/models/account_information_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl AccountInformationResponse { #[must_use] pub fn new() -> AccountInformationResponse { AccountInformationResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/account_information_response_rate_limits_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponseRateLimitsInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl AccountInformationResponseRateLimitsInner { #[must_use] pub fn new() -> AccountInformationResponseRateLimitsInner { AccountInformationResponseRateLimitsInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/account_information_response_result.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponseResult { #[serde(rename = "feeTier", skip_serializing_if = "Option::is_none")] pub fee_tier: Option, #[serde(rename = "canTrade", skip_serializing_if = "Option::is_none")] pub can_trade: Option, #[serde(rename = "canDeposit", skip_serializing_if = "Option::is_none")] pub can_deposit: Option, #[serde(rename = "canWithdraw", skip_serializing_if = "Option::is_none")] pub can_withdraw: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "positions", skip_serializing_if = "Option::is_none")] pub positions: Option>, } impl AccountInformationResponseResult { #[must_use] pub fn new() -> AccountInformationResponseResult { AccountInformationResponseResult { fee_tier: None, can_trade: None, can_deposit: None, can_withdraw: None, update_time: None, assets: None, positions: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/account_information_response_result_assets_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponseResultAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountInformationResponseResultAssetsInner { #[must_use] pub fn new() -> AccountInformationResponseResultAssetsInner { AccountInformationResponseResultAssetsInner { asset: None, wallet_balance: None, unrealized_profit: None, margin_balance: None, maint_margin: None, initial_margin: None, position_initial_margin: None, open_order_initial_margin: None, max_withdraw_amount: None, cross_wallet_balance: None, cross_un_pnl: None, available_balance: None, update_time: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/account_information_response_result_positions_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponseResultPositionsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "isolated", skip_serializing_if = "Option::is_none")] pub isolated: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "notionalValue", skip_serializing_if = "Option::is_none")] pub notional_value: Option, #[serde(rename = "isolatedWallet", skip_serializing_if = "Option::is_none")] pub isolated_wallet: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "breakEvenPrice", skip_serializing_if = "Option::is_none")] pub break_even_price: Option, } impl AccountInformationResponseResultPositionsInner { #[must_use] pub fn new() -> AccountInformationResponseResultPositionsInner { AccountInformationResponseResultPositionsInner { symbol: None, initial_margin: None, maint_margin: None, unrealized_profit: None, position_initial_margin: None, open_order_initial_margin: None, leverage: None, isolated: None, position_side: None, entry_price: None, max_qty: None, notional_value: None, isolated_wallet: None, update_time: None, position_amt: None, break_even_price: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/cancel_order_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelOrderResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl CancelOrderResponse { #[must_use] pub fn new() -> CancelOrderResponse { CancelOrderResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/cancel_order_response_rate_limits_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelOrderResponseRateLimitsInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl CancelOrderResponseRateLimitsInner { #[must_use] pub fn new() -> CancelOrderResponseRateLimitsInner { CancelOrderResponseRateLimitsInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/cancel_order_response_result.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelOrderResponseResult { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "cumQty", skip_serializing_if = "Option::is_none")] pub cum_qty: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "closePosition", skip_serializing_if = "Option::is_none")] pub close_position: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "workingType", skip_serializing_if = "Option::is_none")] pub working_type: Option, #[serde(rename = "priceProtect", skip_serializing_if = "Option::is_none")] pub price_protect: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl CancelOrderResponseResult { #[must_use] pub fn new() -> CancelOrderResponseResult { CancelOrderResponseResult { order_id: None, symbol: None, pair: None, status: None, client_order_id: None, price: None, avg_price: None, orig_qty: None, executed_qty: None, cum_qty: None, cum_base: None, time_in_force: None, r#type: None, reduce_only: None, close_position: None, side: None, position_side: None, stop_price: None, working_type: None, price_protect: None, orig_type: None, update_time: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/close_user_data_stream_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CloseUserDataStreamResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl CloseUserDataStreamResponse { #[must_use] pub fn new() -> CloseUserDataStreamResponse { CloseUserDataStreamResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/close_user_data_stream_response_rate_limits_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CloseUserDataStreamResponseRateLimitsInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl CloseUserDataStreamResponseRateLimitsInner { #[must_use] pub fn new() -> CloseUserDataStreamResponseRateLimitsInner { CloseUserDataStreamResponseRateLimitsInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/futures_account_balance_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesAccountBalanceResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl FuturesAccountBalanceResponse { #[must_use] pub fn new() -> FuturesAccountBalanceResponse { FuturesAccountBalanceResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/futures_account_balance_response_result_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesAccountBalanceResponseResultInner { #[serde(rename = "accountAlias", skip_serializing_if = "Option::is_none")] pub account_alias: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "balance", skip_serializing_if = "Option::is_none")] pub balance: Option, #[serde(rename = "withdrawAvailable", skip_serializing_if = "Option::is_none")] pub withdraw_available: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl FuturesAccountBalanceResponseResultInner { #[must_use] pub fn new() -> FuturesAccountBalanceResponseResultInner { FuturesAccountBalanceResponseResultInner { account_alias: None, asset: None, balance: None, withdraw_available: None, cross_wallet_balance: None, cross_un_pnl: None, available_balance: None, update_time: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/keepalive_user_data_stream_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KeepaliveUserDataStreamResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl KeepaliveUserDataStreamResponse { #[must_use] pub fn new() -> KeepaliveUserDataStreamResponse { KeepaliveUserDataStreamResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/keepalive_user_data_stream_response_result.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KeepaliveUserDataStreamResponseResult { #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl KeepaliveUserDataStreamResponseResult { #[must_use] pub fn new() -> KeepaliveUserDataStreamResponseResult { KeepaliveUserDataStreamResponseResult { listen_key: None } } } src/derivatives_trading_coin_futures/websocket_api/models/mod.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_information_response; pub use self::account_information_response::AccountInformationResponse; pub mod account_information_response_rate_limits_inner; pub use self::account_information_response_rate_limits_inner::AccountInformationResponseRateLimitsInner; pub mod account_information_response_result; pub use self::account_information_response_result::AccountInformationResponseResult; pub mod account_information_response_result_assets_inner; pub use self::account_information_response_result_assets_inner::AccountInformationResponseResultAssetsInner; pub mod account_information_response_result_positions_inner; pub use self::account_information_response_result_positions_inner::AccountInformationResponseResultPositionsInner; pub mod cancel_order_response; pub use self::cancel_order_response::CancelOrderResponse; pub mod cancel_order_response_rate_limits_inner; pub use self::cancel_order_response_rate_limits_inner::CancelOrderResponseRateLimitsInner; pub mod cancel_order_response_result; pub use self::cancel_order_response_result::CancelOrderResponseResult; pub mod close_user_data_stream_response; pub use self::close_user_data_stream_response::CloseUserDataStreamResponse; pub mod close_user_data_stream_response_rate_limits_inner; pub use self::close_user_data_stream_response_rate_limits_inner::CloseUserDataStreamResponseRateLimitsInner; pub mod futures_account_balance_response; pub use self::futures_account_balance_response::FuturesAccountBalanceResponse; pub mod futures_account_balance_response_result_inner; pub use self::futures_account_balance_response_result_inner::FuturesAccountBalanceResponseResultInner; pub mod keepalive_user_data_stream_response; pub use self::keepalive_user_data_stream_response::KeepaliveUserDataStreamResponse; pub mod keepalive_user_data_stream_response_result; pub use self::keepalive_user_data_stream_response_result::KeepaliveUserDataStreamResponseResult; pub mod modify_order_response; pub use self::modify_order_response::ModifyOrderResponse; pub mod modify_order_response_result; pub use self::modify_order_response_result::ModifyOrderResponseResult; pub mod new_order_response; pub use self::new_order_response::NewOrderResponse; pub mod new_order_response_result; pub use self::new_order_response_result::NewOrderResponseResult; pub mod position_information_response; pub use self::position_information_response::PositionInformationResponse; pub mod position_information_response_result_inner; pub use self::position_information_response_result_inner::PositionInformationResponseResultInner; pub mod query_order_response; pub use self::query_order_response::QueryOrderResponse; pub mod query_order_response_result; pub use self::query_order_response_result::QueryOrderResponseResult; pub mod start_user_data_stream_response; pub use self::start_user_data_stream_response::StartUserDataStreamResponse; pub mod start_user_data_stream_response_rate_limits_inner; pub use self::start_user_data_stream_response_rate_limits_inner::StartUserDataStreamResponseRateLimitsInner; pub mod start_user_data_stream_response_result; pub use self::start_user_data_stream_response_result::StartUserDataStreamResponseResult; src/derivatives_trading_coin_futures/websocket_api/models/modify_order_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ModifyOrderResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl ModifyOrderResponse { #[must_use] pub fn new() -> ModifyOrderResponse { ModifyOrderResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/modify_order_response_result.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ModifyOrderResponseResult { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "cumQty", skip_serializing_if = "Option::is_none")] pub cum_qty: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "closePosition", skip_serializing_if = "Option::is_none")] pub close_position: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "workingType", skip_serializing_if = "Option::is_none")] pub working_type: Option, #[serde(rename = "priceProtect", skip_serializing_if = "Option::is_none")] pub price_protect: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl ModifyOrderResponseResult { #[must_use] pub fn new() -> ModifyOrderResponseResult { ModifyOrderResponseResult { order_id: None, symbol: None, pair: None, status: None, client_order_id: None, price: None, avg_price: None, orig_qty: None, executed_qty: None, cum_qty: None, cum_base: None, time_in_force: None, r#type: None, reduce_only: None, close_position: None, side: None, position_side: None, stop_price: None, working_type: None, price_protect: None, orig_type: None, update_time: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/new_order_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewOrderResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl NewOrderResponse { #[must_use] pub fn new() -> NewOrderResponse { NewOrderResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/new_order_response_result.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewOrderResponseResult { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "cumQty", skip_serializing_if = "Option::is_none")] pub cum_qty: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "closePosition", skip_serializing_if = "Option::is_none")] pub close_position: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "workingType", skip_serializing_if = "Option::is_none")] pub working_type: Option, #[serde(rename = "priceProtect", skip_serializing_if = "Option::is_none")] pub price_protect: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl NewOrderResponseResult { #[must_use] pub fn new() -> NewOrderResponseResult { NewOrderResponseResult { order_id: None, symbol: None, pair: None, status: None, client_order_id: None, price: None, avg_price: None, orig_qty: None, executed_qty: None, cum_qty: None, cum_base: None, time_in_force: None, r#type: None, reduce_only: None, close_position: None, side: None, position_side: None, stop_price: None, working_type: None, price_protect: None, orig_type: None, update_time: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/position_information_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionInformationResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl PositionInformationResponse { #[must_use] pub fn new() -> PositionInformationResponse { PositionInformationResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/position_information_response_result_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionInformationResponseResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "unRealizedProfit", skip_serializing_if = "Option::is_none")] pub un_realized_profit: Option, #[serde(rename = "liquidationPrice", skip_serializing_if = "Option::is_none")] pub liquidation_price: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "marginType", skip_serializing_if = "Option::is_none")] pub margin_type: Option, #[serde(rename = "isolatedMargin", skip_serializing_if = "Option::is_none")] pub isolated_margin: Option, #[serde(rename = "isAutoAddMargin", skip_serializing_if = "Option::is_none")] pub is_auto_add_margin: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "notionalValue", skip_serializing_if = "Option::is_none")] pub notional_value: Option, #[serde(rename = "isolatedWallet", skip_serializing_if = "Option::is_none")] pub isolated_wallet: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "breakEvenPrice", skip_serializing_if = "Option::is_none")] pub break_even_price: Option, } impl PositionInformationResponseResultInner { #[must_use] pub fn new() -> PositionInformationResponseResultInner { PositionInformationResponseResultInner { symbol: None, position_amt: None, entry_price: None, mark_price: None, un_realized_profit: None, liquidation_price: None, leverage: None, max_qty: None, margin_type: None, isolated_margin: None, is_auto_add_margin: None, position_side: None, notional_value: None, isolated_wallet: None, update_time: None, break_even_price: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/query_order_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryOrderResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl QueryOrderResponse { #[must_use] pub fn new() -> QueryOrderResponse { QueryOrderResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/start_user_data_stream_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StartUserDataStreamResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl StartUserDataStreamResponse { #[must_use] pub fn new() -> StartUserDataStreamResponse { StartUserDataStreamResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/start_user_data_stream_response_rate_limits_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StartUserDataStreamResponseRateLimitsInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl StartUserDataStreamResponseRateLimitsInner { #[must_use] pub fn new() -> StartUserDataStreamResponseRateLimitsInner { StartUserDataStreamResponseRateLimitsInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/derivatives_trading_coin_futures/websocket_api/models/start_user_data_stream_response_result.rs /* * Binance Derivatives Trading COIN Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StartUserDataStreamResponseResult { #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl StartUserDataStreamResponseResult { #[must_use] pub fn new() -> StartUserDataStreamResponseResult { StartUserDataStreamResponseResult { listen_key: None } } } src/derivatives_trading_coin_futures/websocket_streams/apis/mod.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod websocket_market_streams_api; pub use websocket_market_streams_api::*; src/derivatives_trading_coin_futures/websocket_streams/handle.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ use crate::{common::config::ConfigurationWebsocketStreams, models::WebsocketStreamsConnectConfig}; use super::WebsocketStreams; #[derive(Clone)] pub struct WebsocketStreamsHandle { configuration: ConfigurationWebsocketStreams, } impl WebsocketStreamsHandle { #[must_use] pub fn new(configuration: ConfigurationWebsocketStreams) -> Self { Self { configuration } } /// Connects to a WebSocket stream using default configuration. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let streams = handle.connect().await?; /// pub async fn connect(&self) -> anyhow::Result { self.connect_with_config(Default::default()).await } /// Connects to a WebSocket stream with a custom configuration. /// /// # Arguments /// /// * `cfg` - A configuration object specifying connection details for the WebSocket stream. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let `custom_config` = `WebsocketStreamsConnectConfig::default()`; /// let streams = `handle.connect_with_config(custom_config).await`?; /// pub async fn connect_with_config( &self, cfg: WebsocketStreamsConnectConfig, ) -> anyhow::Result { WebsocketStreams::connect(self.configuration.clone(), cfg.streams, cfg.mode).await } } src/derivatives_trading_coin_futures/websocket_streams/models/account_config_update.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountConfigUpdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "ac", skip_serializing_if = "Option::is_none")] pub ac: Option>, } impl AccountConfigUpdate { #[must_use] pub fn new() -> AccountConfigUpdate { AccountConfigUpdate { e_uppercase: None, t_uppercase: None, ac: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/account_config_update_ac.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountConfigUpdateAc { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, } impl AccountConfigUpdateAc { #[must_use] pub fn new() -> AccountConfigUpdateAc { AccountConfigUpdateAc { s: None, l: None } } } src/derivatives_trading_coin_futures/websocket_streams/models/account_update.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option>, } impl AccountUpdate { #[must_use] pub fn new() -> AccountUpdate { AccountUpdate { e_uppercase: None, t_uppercase: None, i: None, a: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/account_update_a.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateA { #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option>, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option>, } impl AccountUpdateA { #[must_use] pub fn new() -> AccountUpdateA { AccountUpdateA { m: None, b_uppercase: None, p_uppercase: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/account_update_a_b_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateABInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "wb", skip_serializing_if = "Option::is_none")] pub wb: Option, #[serde(rename = "cw", skip_serializing_if = "Option::is_none")] pub cw: Option, #[serde(rename = "bc", skip_serializing_if = "Option::is_none")] pub bc: Option, } impl AccountUpdateABInner { #[must_use] pub fn new() -> AccountUpdateABInner { AccountUpdateABInner { a: None, wb: None, cw: None, bc: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/account_update_a_p_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateAPInner { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "pa", skip_serializing_if = "Option::is_none")] pub pa: Option, #[serde(rename = "ep", skip_serializing_if = "Option::is_none")] pub ep: Option, #[serde(rename = "bep", skip_serializing_if = "Option::is_none")] pub bep: Option, #[serde(rename = "cr", skip_serializing_if = "Option::is_none")] pub cr: Option, #[serde(rename = "up", skip_serializing_if = "Option::is_none")] pub up: Option, #[serde(rename = "mt", skip_serializing_if = "Option::is_none")] pub mt: Option, #[serde(rename = "iw", skip_serializing_if = "Option::is_none")] pub iw: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, } impl AccountUpdateAPInner { #[must_use] pub fn new() -> AccountUpdateAPInner { AccountUpdateAPInner { s: None, pa: None, ep: None, bep: None, cr: None, up: None, mt: None, iw: None, ps: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/aggregate_trade_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AggregateTradeStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, } impl AggregateTradeStreamsResponse { #[must_use] pub fn new() -> AggregateTradeStreamsResponse { AggregateTradeStreamsResponse { e: None, e_uppercase: None, a: None, s: None, p: None, q: None, f: None, l: None, t_uppercase: None, m: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/all_book_tickers_stream_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllBookTickersStreamResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "A", skip_serializing_if = "Option::is_none")] pub a_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, } impl AllBookTickersStreamResponse { #[must_use] pub fn new() -> AllBookTickersStreamResponse { AllBookTickersStreamResponse { e: None, u: None, s: None, ps: None, b: None, b_uppercase: None, a: None, a_uppercase: None, t_uppercase: None, e_uppercase: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/all_market_liquidation_order_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMarketLiquidationOrderStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option>, } impl AllMarketLiquidationOrderStreamsResponse { #[must_use] pub fn new() -> AllMarketLiquidationOrderStreamsResponse { AllMarketLiquidationOrderStreamsResponse { e: None, e_uppercase: None, o: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/all_market_liquidation_order_streams_response_o.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMarketLiquidationOrderStreamsResponseO { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "S", skip_serializing_if = "Option::is_none")] pub s_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "ap", skip_serializing_if = "Option::is_none")] pub ap: Option, #[serde(rename = "X", skip_serializing_if = "Option::is_none")] pub x_uppercase: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "z", skip_serializing_if = "Option::is_none")] pub z: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl AllMarketLiquidationOrderStreamsResponseO { #[must_use] pub fn new() -> AllMarketLiquidationOrderStreamsResponseO { AllMarketLiquidationOrderStreamsResponseO { s: None, ps: None, s_uppercase: None, o: None, f: None, q: None, p: None, ap: None, x_uppercase: None, l: None, z: None, t_uppercase: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/all_market_mini_tickers_stream_response_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMarketMiniTickersStreamResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, } impl AllMarketMiniTickersStreamResponseInner { #[must_use] pub fn new() -> AllMarketMiniTickersStreamResponseInner { AllMarketMiniTickersStreamResponseInner { e: None, e_uppercase: None, s: None, ps: None, c: None, o: None, h: None, l: None, v: None, q: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/all_market_tickers_streams_response_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMarketTickersStreamsResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub w: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "F", skip_serializing_if = "Option::is_none")] pub f_uppercase: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, } impl AllMarketTickersStreamsResponseInner { #[must_use] pub fn new() -> AllMarketTickersStreamsResponseInner { AllMarketTickersStreamsResponseInner { e: None, e_uppercase: None, s: None, ps: None, p: None, p_uppercase: None, w: None, c: None, q_uppercase: None, o: None, h: None, l: None, v: None, q: None, o_uppercase: None, c_uppercase: None, f_uppercase: None, l_uppercase: None, n: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/continuous_contract_kline_candlestick_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ContinuousContractKlineCandlestickStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "ct", skip_serializing_if = "Option::is_none")] pub ct: Option, #[serde(rename = "k", skip_serializing_if = "Option::is_none")] pub k: Option>, } impl ContinuousContractKlineCandlestickStreamsResponse { #[must_use] pub fn new() -> ContinuousContractKlineCandlestickStreamsResponse { ContinuousContractKlineCandlestickStreamsResponse { e: None, e_uppercase: None, ps: None, ct: None, k: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/continuous_contract_kline_candlestick_streams_response_k.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ContinuousContractKlineCandlestickStreamsResponseK { #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "V", skip_serializing_if = "Option::is_none")] pub v_uppercase: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, } impl ContinuousContractKlineCandlestickStreamsResponseK { #[must_use] pub fn new() -> ContinuousContractKlineCandlestickStreamsResponseK { ContinuousContractKlineCandlestickStreamsResponseK { t: None, t_uppercase: None, i: None, f: None, l_uppercase: None, o: None, c: None, h: None, l: None, v: None, n: None, x: None, q: None, v_uppercase: None, q_uppercase: None, b_uppercase: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/contract_info_stream_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ContractInfoStreamResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "ct", skip_serializing_if = "Option::is_none")] pub ct: Option, #[serde(rename = "dt", skip_serializing_if = "Option::is_none")] pub dt: Option, #[serde(rename = "ot", skip_serializing_if = "Option::is_none")] pub ot: Option, #[serde(rename = "cs", skip_serializing_if = "Option::is_none")] pub cs: Option, #[serde(rename = "bks", skip_serializing_if = "Option::is_none")] pub bks: Option>, } impl ContractInfoStreamResponse { #[must_use] pub fn new() -> ContractInfoStreamResponse { ContractInfoStreamResponse { e: None, e_uppercase: None, s: None, ps: None, ct: None, dt: None, ot: None, cs: None, bks: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/contract_info_stream_response_bks_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ContractInfoStreamResponseBksInner { #[serde(rename = "bs", skip_serializing_if = "Option::is_none")] pub bs: Option, #[serde(rename = "bnf", skip_serializing_if = "Option::is_none")] pub bnf: Option, #[serde(rename = "bnc", skip_serializing_if = "Option::is_none")] pub bnc: Option, #[serde(rename = "mmr", skip_serializing_if = "Option::is_none")] pub mmr: Option, #[serde(rename = "cf", skip_serializing_if = "Option::is_none")] pub cf: Option, #[serde(rename = "mi", skip_serializing_if = "Option::is_none")] pub mi: Option, #[serde(rename = "ma", skip_serializing_if = "Option::is_none")] pub ma: Option, } impl ContractInfoStreamResponseBksInner { #[must_use] pub fn new() -> ContractInfoStreamResponseBksInner { ContractInfoStreamResponseBksInner { bs: None, bnf: None, bnc: None, mmr: None, cf: None, mi: None, ma: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/diff_book_depth_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DiffBookDepthStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "U", skip_serializing_if = "Option::is_none")] pub u_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "pu", skip_serializing_if = "Option::is_none")] pub pu: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option>>, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option>>, } impl DiffBookDepthStreamsResponse { #[must_use] pub fn new() -> DiffBookDepthStreamsResponse { DiffBookDepthStreamsResponse { e: None, e_uppercase: None, t_uppercase: None, s: None, ps: None, u_uppercase: None, u: None, pu: None, b: None, a: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/grid_update.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GridUpdate { #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "gu", skip_serializing_if = "Option::is_none")] pub gu: Option>, } impl GridUpdate { #[must_use] pub fn new() -> GridUpdate { GridUpdate { t_uppercase: None, e_uppercase: None, gu: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/grid_update_gu.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GridUpdateGu { #[serde(rename = "si", skip_serializing_if = "Option::is_none")] pub si: Option, #[serde(rename = "st", skip_serializing_if = "Option::is_none")] pub st: Option, #[serde(rename = "ss", skip_serializing_if = "Option::is_none")] pub ss: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, #[serde(rename = "up", skip_serializing_if = "Option::is_none")] pub up: Option, #[serde(rename = "uq", skip_serializing_if = "Option::is_none")] pub uq: Option, #[serde(rename = "uf", skip_serializing_if = "Option::is_none")] pub uf: Option, #[serde(rename = "mp", skip_serializing_if = "Option::is_none")] pub mp: Option, #[serde(rename = "ut", skip_serializing_if = "Option::is_none")] pub ut: Option, } impl GridUpdateGu { #[must_use] pub fn new() -> GridUpdateGu { GridUpdateGu { si: None, st: None, ss: None, s: None, r: None, up: None, uq: None, uf: None, mp: None, ut: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/index_kline_candlestick_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndexKlineCandlestickStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "k", skip_serializing_if = "Option::is_none")] pub k: Option>, } impl IndexKlineCandlestickStreamsResponse { #[must_use] pub fn new() -> IndexKlineCandlestickStreamsResponse { IndexKlineCandlestickStreamsResponse { e: None, e_uppercase: None, ps: None, k: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/index_kline_candlestick_streams_response_k.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndexKlineCandlestickStreamsResponseK { #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "V", skip_serializing_if = "Option::is_none")] pub v_uppercase: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, } impl IndexKlineCandlestickStreamsResponseK { #[must_use] pub fn new() -> IndexKlineCandlestickStreamsResponseK { IndexKlineCandlestickStreamsResponseK { t: None, t_uppercase: None, s: None, i: None, f: None, l_uppercase: None, o: None, c: None, h: None, l: None, v: None, n: None, x: None, q: None, v_uppercase: None, q_uppercase: None, b_uppercase: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/index_price_stream_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndexPriceStreamResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, } impl IndexPriceStreamResponse { #[must_use] pub fn new() -> IndexPriceStreamResponse { IndexPriceStreamResponse { e: None, e_uppercase: None, i: None, p: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/individual_symbol_book_ticker_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndividualSymbolBookTickerStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "A", skip_serializing_if = "Option::is_none")] pub a_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, } impl IndividualSymbolBookTickerStreamsResponse { #[must_use] pub fn new() -> IndividualSymbolBookTickerStreamsResponse { IndividualSymbolBookTickerStreamsResponse { e: None, u: None, s: None, ps: None, b: None, b_uppercase: None, a: None, a_uppercase: None, t_uppercase: None, e_uppercase: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/individual_symbol_mini_ticker_stream_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndividualSymbolMiniTickerStreamResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, } impl IndividualSymbolMiniTickerStreamResponse { #[must_use] pub fn new() -> IndividualSymbolMiniTickerStreamResponse { IndividualSymbolMiniTickerStreamResponse { e: None, e_uppercase: None, s: None, ps: None, c: None, o: None, h: None, l: None, v: None, q: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/individual_symbol_ticker_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndividualSymbolTickerStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub w: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "F", skip_serializing_if = "Option::is_none")] pub f_uppercase: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, } impl IndividualSymbolTickerStreamsResponse { #[must_use] pub fn new() -> IndividualSymbolTickerStreamsResponse { IndividualSymbolTickerStreamsResponse { e: None, e_uppercase: None, s: None, ps: None, p: None, p_uppercase: None, w: None, c: None, q_uppercase: None, o: None, h: None, l: None, v: None, q: None, o_uppercase: None, c_uppercase: None, f_uppercase: None, l_uppercase: None, n: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/kline_candlestick_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlineCandlestickStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "k", skip_serializing_if = "Option::is_none")] pub k: Option>, } impl KlineCandlestickStreamsResponse { #[must_use] pub fn new() -> KlineCandlestickStreamsResponse { KlineCandlestickStreamsResponse { e: None, e_uppercase: None, s: None, k: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/kline_candlestick_streams_response_k.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlineCandlestickStreamsResponseK { #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "V", skip_serializing_if = "Option::is_none")] pub v_uppercase: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, } impl KlineCandlestickStreamsResponseK { #[must_use] pub fn new() -> KlineCandlestickStreamsResponseK { KlineCandlestickStreamsResponseK { t: None, t_uppercase: None, s: None, i: None, f: None, l_uppercase: None, o: None, c: None, h: None, l: None, v: None, n: None, x: None, q: None, v_uppercase: None, q_uppercase: None, b_uppercase: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/liquidation_order_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct LiquidationOrderStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option>, } impl LiquidationOrderStreamsResponse { #[must_use] pub fn new() -> LiquidationOrderStreamsResponse { LiquidationOrderStreamsResponse { e: None, e_uppercase: None, o: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/listenkeyexpired.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Listenkeyexpired { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl Listenkeyexpired { #[must_use] pub fn new() -> Listenkeyexpired { Listenkeyexpired { e_uppercase: None, listen_key: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/margin_call.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginCall { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "cw", skip_serializing_if = "Option::is_none")] pub cw: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option>, } impl MarginCall { #[must_use] pub fn new() -> MarginCall { MarginCall { e_uppercase: None, i: None, cw: None, p: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/margin_call_p_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginCallPInner { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "pa", skip_serializing_if = "Option::is_none")] pub pa: Option, #[serde(rename = "mt", skip_serializing_if = "Option::is_none")] pub mt: Option, #[serde(rename = "iw", skip_serializing_if = "Option::is_none")] pub iw: Option, #[serde(rename = "mp", skip_serializing_if = "Option::is_none")] pub mp: Option, #[serde(rename = "up", skip_serializing_if = "Option::is_none")] pub up: Option, #[serde(rename = "mm", skip_serializing_if = "Option::is_none")] pub mm: Option, } impl MarginCallPInner { #[must_use] pub fn new() -> MarginCallPInner { MarginCallPInner { s: None, ps: None, pa: None, mt: None, iw: None, mp: None, up: None, mm: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/mark_price_kline_candlestick_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarkPriceKlineCandlestickStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "k", skip_serializing_if = "Option::is_none")] pub k: Option>, } impl MarkPriceKlineCandlestickStreamsResponse { #[must_use] pub fn new() -> MarkPriceKlineCandlestickStreamsResponse { MarkPriceKlineCandlestickStreamsResponse { e: None, e_uppercase: None, ps: None, k: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/mark_price_kline_candlestick_streams_response_k.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarkPriceKlineCandlestickStreamsResponseK { #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "V", skip_serializing_if = "Option::is_none")] pub v_uppercase: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, } impl MarkPriceKlineCandlestickStreamsResponseK { #[must_use] pub fn new() -> MarkPriceKlineCandlestickStreamsResponseK { MarkPriceKlineCandlestickStreamsResponseK { t: None, t_uppercase: None, s: None, i: None, f: None, l_uppercase: None, o: None, c: None, h: None, l: None, v: None, n: None, x: None, q: None, v_uppercase: None, q_uppercase: None, b_uppercase: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/mark_price_of_all_symbols_of_a_pair_response_inner.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarkPriceOfAllSymbolsOfAPairResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl MarkPriceOfAllSymbolsOfAPairResponseInner { #[must_use] pub fn new() -> MarkPriceOfAllSymbolsOfAPairResponseInner { MarkPriceOfAllSymbolsOfAPairResponseInner { e: None, e_uppercase: None, s: None, p: None, p_uppercase: None, i: None, r: None, t_uppercase: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/mark_price_stream_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarkPriceStreamResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl MarkPriceStreamResponse { #[must_use] pub fn new() -> MarkPriceStreamResponse { MarkPriceStreamResponse { e: None, e_uppercase: None, s: None, p: None, p_uppercase: None, i: None, r: None, t_uppercase: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/order_trade_update.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTradeUpdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option>, } impl OrderTradeUpdate { #[must_use] pub fn new() -> OrderTradeUpdate { OrderTradeUpdate { e_uppercase: None, t_uppercase: None, i: None, o: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/partial_book_depth_streams_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PartialBookDepthStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "U", skip_serializing_if = "Option::is_none")] pub u_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "pu", skip_serializing_if = "Option::is_none")] pub pu: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option>>, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option>>, } impl PartialBookDepthStreamsResponse { #[must_use] pub fn new() -> PartialBookDepthStreamsResponse { PartialBookDepthStreamsResponse { e: None, e_uppercase: None, t_uppercase: None, s: None, ps: None, u_uppercase: None, u: None, pu: None, b: None, a: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/strategy_update.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StrategyUpdate { #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "su", skip_serializing_if = "Option::is_none")] pub su: Option>, } impl StrategyUpdate { #[must_use] pub fn new() -> StrategyUpdate { StrategyUpdate { t_uppercase: None, e_uppercase: None, su: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/strategy_update_su.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StrategyUpdateSu { #[serde(rename = "si", skip_serializing_if = "Option::is_none")] pub si: Option, #[serde(rename = "st", skip_serializing_if = "Option::is_none")] pub st: Option, #[serde(rename = "ss", skip_serializing_if = "Option::is_none")] pub ss: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ut", skip_serializing_if = "Option::is_none")] pub ut: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, } impl StrategyUpdateSu { #[must_use] pub fn new() -> StrategyUpdateSu { StrategyUpdateSu { si: None, st: None, ss: None, s: None, ut: None, c: None, } } } src/derivatives_trading_coin_futures/websocket_streams/models/user_data_stream_events_response.rs /* * Binance Derivatives Trading COIN Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading COIN Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_coin_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(try_from = "Value")] pub enum UserDataStreamEventsResponse { #[serde(rename = "ACCOUNT_CONFIG_UPDATE")] AccountConfigUpdate(Box), #[serde(rename = "ACCOUNT_UPDATE")] AccountUpdate(Box), #[serde(rename = "GRID_UPDATE")] GridUpdate(Box), #[serde(rename = "MARGIN_CALL")] MarginCall(Box), #[serde(rename = "ORDER_TRADE_UPDATE")] OrderTradeUpdate(Box), #[serde(rename = "STRATEGY_UPDATE")] StrategyUpdate(Box), #[serde(rename = "listenKeyExpired")] ListenKeyExpired(Box), Other(serde_json::Value), } impl Default for UserDataStreamEventsResponse { fn default() -> Self { Self::AccountConfigUpdate(Default::default()) } } impl TryFrom for UserDataStreamEventsResponse { type Error = serde_json::Error; fn try_from(v: Value) -> Result { let tag = v .get("e") .and_then(Value::as_str) .ok_or_else(|| serde_json::Error::custom("missing field `e`"))?; match tag { "ACCOUNT_CONFIG_UPDATE" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::AccountConfigUpdate(Box::new( payload, ))) } "ACCOUNT_UPDATE" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::AccountUpdate(Box::new( payload, ))) } "GRID_UPDATE" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::GridUpdate(Box::new(payload))) } "MARGIN_CALL" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::MarginCall(Box::new(payload))) } "ORDER_TRADE_UPDATE" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::OrderTradeUpdate(Box::new( payload, ))) } "STRATEGY_UPDATE" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::StrategyUpdate(Box::new( payload, ))) } "listenKeyExpired" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::ListenKeyExpired(Box::new( payload, ))) } _ => Ok(UserDataStreamEventsResponse::Other(v)), } } } src/derivatives_trading_options/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::derivatives_trading_options; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsRestApi::production(configuration); let params = derivatives_trading_options::rest_api::OptionAccountInformationParams::default(); let response = client.option_account_information(params).await?; ``` src/derivatives_trading_options/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::derivatives_trading_options; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsRestApi::production(configuration); let params = derivatives_trading_options::rest_api::OptionAccountInformationParams::default(); let response = client.option_account_information(params).await?; ``` src/derivatives_trading_options/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::derivatives_trading_options; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi::production(configuration); match client.exchange_information().await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/derivatives_trading_options/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::derivatives_trading_options; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsRestApi::production(configuration); let params = derivatives_trading_options::rest_api::OptionAccountInformationParams::default(); let response = client.option_account_information(params).await?; ``` src/derivatives_trading_options/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::derivatives_trading_options; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsRestApi::production(configuration); let params = derivatives_trading_options::rest_api::OptionAccountInformationParams::default(); let response = client.option_account_information(params).await?; ``` src/derivatives_trading_options/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::derivatives_trading_options; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsRestApi::production(configuration); let params = derivatives_trading_options::rest_api::OptionAccountInformationParams::default(); let response = client.option_account_information(params).await?; ``` src/derivatives_trading_options/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::derivatives_trading_options; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsRestApi::production(configuration); let params = derivatives_trading_options::rest_api::OptionAccountInformationParams::default(); let response = client.option_account_information(params).await?; ``` src/derivatives_trading_options/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::derivatives_trading_options; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsRestApi::production(configuration); let params = derivatives_trading_options::rest_api::OptionAccountInformationParams::default(); let response = client.option_account_information(params).await?; ``` src/derivatives_trading_options/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::derivatives_trading_options; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsRestApi::production(configuration); let params = derivatives_trading_options::rest_api::OptionAccountInformationParams::default(); let response = client.option_account_information(params).await?; ``` src/derivatives_trading_options/docs/websocket_streams/agent.md # WebSocket Agent Configuration ```rust use tokio_tungstenite::Connector; use native_tls::{TlsConnector, Protocol}; use binance_sdk::derivatives_trading_options; use binance_sdk::config; let native_tls = TlsConnector::builder() .min_protocol_version(Some(Protocol::Tlsv12)) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_options::websocket_streams::NewSymbolInfoParams::default(); let stream = connection.new_symbol_info(params).await?; ``` src/derivatives_trading_options/docs/websocket_streams/certificate-pinning.md # WebSocket Agent Configuration ```rust use std::fs; use tokio_tungstenite::Connector; use native_tls::{Certificate, TlsConnector, Protocol}; use binance_sdk::derivatives_trading_options; use binance_sdk::config; let cert_pem = fs::read("/path/to/pinned_cert.pem")?; let cert = Certificate::from_pem(&cert_pem)?; let native_tls = TlsConnector::builder() .add_root_certificate(cert) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_options::websocket_streams::NewSymbolInfoParams::default(); let stream = connection.new_symbol_info(params).await?; ``` src/derivatives_trading_options/docs/websocket_streams/connection-mode.md # Connection Mode Configuration ```rust use binance_sdk::derivatives_trading_options; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .mode(models::WebsocketMode::Pool(3)) // Use pool mode with a pool size of 3 .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_options::websocket_streams::NewSymbolInfoParams::default(); let stream = connection.new_symbol_info(params).await?; ``` src/derivatives_trading_options/docs/websocket_streams/reconnect-delay.md # Reconnect Delay Configuration ```rust use binance_sdk::derivatives_trading_options; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .reconnect_delay(3000) // Set reconnect delay to 3 seconds .build()?; let client = derivatives_trading_options::DerivativesTradingOptionsWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_options::websocket_streams::NewSymbolInfoParams::default(); let stream = connection.new_symbol_info(params).await?; ``` src/derivatives_trading_options/mod.rs pub mod rest_api; pub mod websocket_streams; use crate::common::{ config::{ConfigurationRestApi, ConfigurationWebsocketStreams}, constants::{ DERIVATIVES_TRADING_OPTIONS_REST_API_PROD_URL, DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_PROD_URL, }, logger, utils::build_user_agent, }; /// Represents the `DerivativesTradingOptions` REST API client for interacting with the Binance `DerivativesTradingOptions` REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct DerivativesTradingOptionsRestApi {} impl DerivativesTradingOptionsRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production `DerivativesTradingOptions` REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("derivatives-trading-options"); if config.base_path.is_none() { config.base_path = Some(DERIVATIVES_TRADING_OPTIONS_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(DERIVATIVES_TRADING_OPTIONS_REST_API_PROD_URL.to_string()); DerivativesTradingOptionsRestApi::from_config(config) } } /// Represents the `DerivativesTradingOptions` WebSocket Streams client for interacting with the Binance `DerivativesTradingOptions` WebSocket Streams. /// /// This struct provides methods to create WebSocket Streams clients for the production environment. pub struct DerivativesTradingOptionsWsStreams {} impl DerivativesTradingOptionsWsStreams { /// Creates a WebSocket streams client configured with the given settings. /// /// If no WS URL is specified in the configuration, defaults to the production `DerivativesTradingOptions` WebSocket Streams URL. /// /// # Arguments /// /// * `config` - Configuration for the WebSocket streams client /// /// # Returns /// /// A new WebSocket streams client configured with the provided settings #[must_use] pub fn from_config( mut config: ConfigurationWebsocketStreams, ) -> websocket_streams::WebsocketStreamsHandle { logger::init(); config.user_agent = build_user_agent("derivatives-trading-options"); if config.ws_url.is_none() { config.ws_url = Some(DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_PROD_URL.to_string()); } websocket_streams::WebsocketStreamsHandle::new(config) } /// Creates a WebSocket streams client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the WebSocket streams client /// /// # Returns /// /// A new WebSocket streams client configured for the production environment #[must_use] pub fn production( mut config: ConfigurationWebsocketStreams, ) -> websocket_streams::WebsocketStreamsHandle { config.ws_url = Some(DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_PROD_URL.to_string()); DerivativesTradingOptionsWsStreams::from_config(config) } } src/derivatives_trading_options/rest_api/apis/mod.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod market_data_api; pub use market_data_api::*; pub mod market_maker_block_trade_api; pub use market_maker_block_trade_api::*; pub mod market_maker_endpoints_api; pub use market_maker_endpoints_api::*; pub mod trade_api; pub use trade_api::*; pub mod user_data_streams_api; pub use user_data_streams_api::*; src/derivatives_trading_options/rest_api/models/accept_block_trade_order_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcceptBlockTradeOrderResponse { #[serde( rename = "blockTradeSettlementKey", skip_serializing_if = "Option::is_none" )] pub block_trade_settlement_key: Option, #[serde(rename = "expireTime", skip_serializing_if = "Option::is_none")] pub expire_time: Option, #[serde(rename = "liquidity", skip_serializing_if = "Option::is_none")] pub liquidity: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "legs", skip_serializing_if = "Option::is_none")] pub legs: Option>, } impl AcceptBlockTradeOrderResponse { #[must_use] pub fn new() -> AcceptBlockTradeOrderResponse { AcceptBlockTradeOrderResponse { block_trade_settlement_key: None, expire_time: None, liquidity: None, status: None, create_time: None, legs: None, } } } src/derivatives_trading_options/rest_api/models/accept_block_trade_order_response_legs_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcceptBlockTradeOrderResponseLegsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, } impl AcceptBlockTradeOrderResponseLegsInner { #[must_use] pub fn new() -> AcceptBlockTradeOrderResponseLegsInner { AcceptBlockTradeOrderResponseLegsInner { symbol: None, side: None, quantity: None, price: None, } } } src/derivatives_trading_options/rest_api/models/account_block_trade_list_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountBlockTradeListResponseInner { #[serde(rename = "parentOrderId", skip_serializing_if = "Option::is_none")] pub parent_order_id: Option, #[serde(rename = "crossType", skip_serializing_if = "Option::is_none")] pub cross_type: Option, #[serde(rename = "legs", skip_serializing_if = "Option::is_none")] pub legs: Option>, #[serde( rename = "blockTradeSettlementKey", skip_serializing_if = "Option::is_none" )] pub block_trade_settlement_key: Option, } impl AccountBlockTradeListResponseInner { #[must_use] pub fn new() -> AccountBlockTradeListResponseInner { AccountBlockTradeListResponseInner { parent_order_id: None, cross_type: None, legs: None, block_trade_settlement_key: None, } } } src/derivatives_trading_options/rest_api/models/account_block_trade_list_response_inner_legs_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountBlockTradeListResponseInnerLegsInner { #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderPrice", skip_serializing_if = "Option::is_none")] pub order_price: Option, #[serde(rename = "orderQuantity", skip_serializing_if = "Option::is_none")] pub order_quantity: Option, #[serde(rename = "orderStatus", skip_serializing_if = "Option::is_none")] pub order_status: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "executedAmount", skip_serializing_if = "Option::is_none")] pub executed_amount: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "orderType", skip_serializing_if = "Option::is_none")] pub order_type: Option, #[serde(rename = "orderSide", skip_serializing_if = "Option::is_none")] pub order_side: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, #[serde(rename = "tradePrice", skip_serializing_if = "Option::is_none")] pub trade_price: Option, #[serde(rename = "tradeQty", skip_serializing_if = "Option::is_none")] pub trade_qty: Option, #[serde(rename = "tradeTime", skip_serializing_if = "Option::is_none")] pub trade_time: Option, #[serde(rename = "liquidity", skip_serializing_if = "Option::is_none")] pub liquidity: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, } impl AccountBlockTradeListResponseInnerLegsInner { #[must_use] pub fn new() -> AccountBlockTradeListResponseInnerLegsInner { AccountBlockTradeListResponseInnerLegsInner { create_time: None, update_time: None, symbol: None, order_id: None, order_price: None, order_quantity: None, order_status: None, executed_qty: None, executed_amount: None, fee: None, order_type: None, order_side: None, id: None, trade_id: None, trade_price: None, trade_qty: None, trade_time: None, liquidity: None, commission: None, } } } src/derivatives_trading_options/rest_api/models/account_funding_flow_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountFundingFlowResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "createDate", skip_serializing_if = "Option::is_none")] pub create_date: Option, } impl AccountFundingFlowResponseInner { #[must_use] pub fn new() -> AccountFundingFlowResponseInner { AccountFundingFlowResponseInner { id: None, asset: None, amount: None, r#type: None, create_date: None, } } } src/derivatives_trading_options/rest_api/models/account_trade_list_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountTradeListResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "realizedProfit", skip_serializing_if = "Option::is_none")] pub realized_profit: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "volatility", skip_serializing_if = "Option::is_none")] pub volatility: Option, #[serde(rename = "liquidity", skip_serializing_if = "Option::is_none")] pub liquidity: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "priceScale", skip_serializing_if = "Option::is_none")] pub price_scale: Option, #[serde(rename = "quantityScale", skip_serializing_if = "Option::is_none")] pub quantity_scale: Option, #[serde(rename = "optionSide", skip_serializing_if = "Option::is_none")] pub option_side: Option, } impl AccountTradeListResponseInner { #[must_use] pub fn new() -> AccountTradeListResponseInner { AccountTradeListResponseInner { id: None, trade_id: None, order_id: None, symbol: None, price: None, quantity: None, fee: None, realized_profit: None, side: None, r#type: None, volatility: None, liquidity: None, quote_asset: None, time: None, price_scale: None, quantity_scale: None, option_side: None, } } } src/derivatives_trading_options/rest_api/models/auto_cancel_all_open_orders_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AutoCancelAllOpenOrdersResponse { #[serde(rename = "underlyings", skip_serializing_if = "Option::is_none")] pub underlyings: Option>, } impl AutoCancelAllOpenOrdersResponse { #[must_use] pub fn new() -> AutoCancelAllOpenOrdersResponse { AutoCancelAllOpenOrdersResponse { underlyings: None } } } src/derivatives_trading_options/rest_api/models/cancel_all_option_orders_by_underlying_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAllOptionOrdersByUnderlyingResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option, } impl CancelAllOptionOrdersByUnderlyingResponse { #[must_use] pub fn new() -> CancelAllOptionOrdersByUnderlyingResponse { CancelAllOptionOrdersByUnderlyingResponse { code: None, msg: None, data: None, } } } src/derivatives_trading_options/rest_api/models/cancel_all_option_orders_on_specific_symbol_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAllOptionOrdersOnSpecificSymbolResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAllOptionOrdersOnSpecificSymbolResponse { #[must_use] pub fn new() -> CancelAllOptionOrdersOnSpecificSymbolResponse { CancelAllOptionOrdersOnSpecificSymbolResponse { code: None, msg: None, } } } src/derivatives_trading_options/rest_api/models/cancel_multiple_option_orders_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelMultipleOptionOrdersResponseInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl CancelMultipleOptionOrdersResponseInner { #[must_use] pub fn new() -> CancelMultipleOptionOrdersResponseInner { CancelMultipleOptionOrdersResponseInner { order_id: None, symbol: None, price: None, quantity: None, executed_qty: None, fee: None, side: None, r#type: None, time_in_force: None, create_time: None, status: None, avg_price: None, reduce_only: None, client_order_id: None, update_time: None, } } } src/derivatives_trading_options/rest_api/models/cancel_option_order_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelOptionOrderResponse { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "postOnly", skip_serializing_if = "Option::is_none")] pub post_only: Option, #[serde(rename = "createDate", skip_serializing_if = "Option::is_none")] pub create_date: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "source", skip_serializing_if = "Option::is_none")] pub source: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "priceScale", skip_serializing_if = "Option::is_none")] pub price_scale: Option, #[serde(rename = "quantityScale", skip_serializing_if = "Option::is_none")] pub quantity_scale: Option, #[serde(rename = "optionSide", skip_serializing_if = "Option::is_none")] pub option_side: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, #[serde(rename = "mmp", skip_serializing_if = "Option::is_none")] pub mmp: Option, } impl CancelOptionOrderResponse { #[must_use] pub fn new() -> CancelOptionOrderResponse { CancelOptionOrderResponse { order_id: None, symbol: None, price: None, quantity: None, executed_qty: None, fee: None, side: None, r#type: None, time_in_force: None, reduce_only: None, post_only: None, create_date: None, update_time: None, status: None, avg_price: None, source: None, client_order_id: None, price_scale: None, quantity_scale: None, option_side: None, quote_asset: None, mmp: None, } } } src/derivatives_trading_options/rest_api/models/check_server_time_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckServerTimeResponse { #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, } impl CheckServerTimeResponse { #[must_use] pub fn new() -> CheckServerTimeResponse { CheckServerTimeResponse { server_time: None } } } src/derivatives_trading_options/rest_api/models/exchange_information_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponse { #[serde(rename = "timezone", skip_serializing_if = "Option::is_none")] pub timezone: Option, #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, #[serde(rename = "optionContracts", skip_serializing_if = "Option::is_none")] pub option_contracts: Option>, #[serde(rename = "optionAssets", skip_serializing_if = "Option::is_none")] pub option_assets: Option>, #[serde(rename = "optionSymbols", skip_serializing_if = "Option::is_none")] pub option_symbols: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl ExchangeInformationResponse { #[must_use] pub fn new() -> ExchangeInformationResponse { ExchangeInformationResponse { timezone: None, server_time: None, option_contracts: None, option_assets: None, option_symbols: None, rate_limits: None, } } } src/derivatives_trading_options/rest_api/models/exchange_information_response_option_assets_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponseOptionAssetsInner { #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, } impl ExchangeInformationResponseOptionAssetsInner { #[must_use] pub fn new() -> ExchangeInformationResponseOptionAssetsInner { ExchangeInformationResponseOptionAssetsInner { name: None } } } src/derivatives_trading_options/rest_api/models/exchange_information_response_option_contracts_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponseOptionContractsInner { #[serde(rename = "baseAsset", skip_serializing_if = "Option::is_none")] pub base_asset: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, #[serde(rename = "underlying", skip_serializing_if = "Option::is_none")] pub underlying: Option, #[serde(rename = "settleAsset", skip_serializing_if = "Option::is_none")] pub settle_asset: Option, } impl ExchangeInformationResponseOptionContractsInner { #[must_use] pub fn new() -> ExchangeInformationResponseOptionContractsInner { ExchangeInformationResponseOptionContractsInner { base_asset: None, quote_asset: None, underlying: None, settle_asset: None, } } } src/derivatives_trading_options/rest_api/models/exchange_information_response_option_symbols_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponseOptionSymbolsInner { #[serde(rename = "expiryDate", skip_serializing_if = "Option::is_none")] pub expiry_date: Option, #[serde(rename = "filters", skip_serializing_if = "Option::is_none")] pub filters: Option>, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "strikePrice", skip_serializing_if = "Option::is_none")] pub strike_price: Option, #[serde(rename = "underlying", skip_serializing_if = "Option::is_none")] pub underlying: Option, #[serde(rename = "unit", skip_serializing_if = "Option::is_none")] pub unit: Option, #[serde(rename = "makerFeeRate", skip_serializing_if = "Option::is_none")] pub maker_fee_rate: Option, #[serde(rename = "takerFeeRate", skip_serializing_if = "Option::is_none")] pub taker_fee_rate: Option, #[serde(rename = "liquidationFeeRate", skip_serializing_if = "Option::is_none")] pub liquidation_fee_rate: Option, #[serde(rename = "minQty", skip_serializing_if = "Option::is_none")] pub min_qty: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintenanceMargin", skip_serializing_if = "Option::is_none")] pub maintenance_margin: Option, #[serde(rename = "minInitialMargin", skip_serializing_if = "Option::is_none")] pub min_initial_margin: Option, #[serde( rename = "minMaintenanceMargin", skip_serializing_if = "Option::is_none" )] pub min_maintenance_margin: Option, #[serde(rename = "priceScale", skip_serializing_if = "Option::is_none")] pub price_scale: Option, #[serde(rename = "quantityScale", skip_serializing_if = "Option::is_none")] pub quantity_scale: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, } impl ExchangeInformationResponseOptionSymbolsInner { #[must_use] pub fn new() -> ExchangeInformationResponseOptionSymbolsInner { ExchangeInformationResponseOptionSymbolsInner { expiry_date: None, filters: None, symbol: None, side: None, strike_price: None, underlying: None, unit: None, maker_fee_rate: None, taker_fee_rate: None, liquidation_fee_rate: None, min_qty: None, max_qty: None, initial_margin: None, maintenance_margin: None, min_initial_margin: None, min_maintenance_margin: None, price_scale: None, quantity_scale: None, quote_asset: None, } } } src/derivatives_trading_options/rest_api/models/exchange_information_response_option_symbols_inner_filters_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponseOptionSymbolsInnerFiltersInner { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "minPrice", skip_serializing_if = "Option::is_none")] pub min_price: Option, #[serde(rename = "maxPrice", skip_serializing_if = "Option::is_none")] pub max_price: Option, #[serde(rename = "tickSize", skip_serializing_if = "Option::is_none")] pub tick_size: Option, #[serde(rename = "minQty", skip_serializing_if = "Option::is_none")] pub min_qty: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "stepSize", skip_serializing_if = "Option::is_none")] pub step_size: Option, } impl ExchangeInformationResponseOptionSymbolsInnerFiltersInner { #[must_use] pub fn new() -> ExchangeInformationResponseOptionSymbolsInnerFiltersInner { ExchangeInformationResponseOptionSymbolsInnerFiltersInner { filter_type: None, min_price: None, max_price: None, tick_size: None, min_qty: None, max_qty: None, step_size: None, } } } src/derivatives_trading_options/rest_api/models/exchange_information_response_rate_limits_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponseRateLimitsInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, } impl ExchangeInformationResponseRateLimitsInner { #[must_use] pub fn new() -> ExchangeInformationResponseRateLimitsInner { ExchangeInformationResponseRateLimitsInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, } } } src/derivatives_trading_options/rest_api/models/extend_block_trade_order_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExtendBlockTradeOrderResponse { #[serde( rename = "blockTradeSettlementKey", skip_serializing_if = "Option::is_none" )] pub block_trade_settlement_key: Option, #[serde(rename = "expireTime", skip_serializing_if = "Option::is_none")] pub expire_time: Option, #[serde(rename = "liquidity", skip_serializing_if = "Option::is_none")] pub liquidity: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "legs", skip_serializing_if = "Option::is_none")] pub legs: Option>, } impl ExtendBlockTradeOrderResponse { #[must_use] pub fn new() -> ExtendBlockTradeOrderResponse { ExtendBlockTradeOrderResponse { block_trade_settlement_key: None, expire_time: None, liquidity: None, status: None, create_time: None, legs: None, } } } src/derivatives_trading_options/rest_api/models/extend_block_trade_order_response_legs_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExtendBlockTradeOrderResponseLegsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, } impl ExtendBlockTradeOrderResponseLegsInner { #[must_use] pub fn new() -> ExtendBlockTradeOrderResponseLegsInner { ExtendBlockTradeOrderResponseLegsInner { symbol: None, side: None, quantity: None, price: None, } } } src/derivatives_trading_options/rest_api/models/get_auto_cancel_all_open_orders_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAutoCancelAllOpenOrdersResponse { #[serde(rename = "underlying", skip_serializing_if = "Option::is_none")] pub underlying: Option, #[serde(rename = "countdownTime", skip_serializing_if = "Option::is_none")] pub countdown_time: Option, } impl GetAutoCancelAllOpenOrdersResponse { #[must_use] pub fn new() -> GetAutoCancelAllOpenOrdersResponse { GetAutoCancelAllOpenOrdersResponse { underlying: None, countdown_time: None, } } } src/derivatives_trading_options/rest_api/models/get_download_id_for_option_transaction_history_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDownloadIdForOptionTransactionHistoryResponse { #[serde( rename = "avgCostTimestampOfLast30d", skip_serializing_if = "Option::is_none" )] pub avg_cost_timestamp_of_last30d: Option, #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, } impl GetDownloadIdForOptionTransactionHistoryResponse { #[must_use] pub fn new() -> GetDownloadIdForOptionTransactionHistoryResponse { GetDownloadIdForOptionTransactionHistoryResponse { avg_cost_timestamp_of_last30d: None, download_id: None, } } } src/derivatives_trading_options/rest_api/models/get_market_maker_protection_config_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetMarketMakerProtectionConfigResponse { #[serde(rename = "underlyingId", skip_serializing_if = "Option::is_none")] pub underlying_id: Option, #[serde(rename = "underlying", skip_serializing_if = "Option::is_none")] pub underlying: Option, #[serde( rename = "windowTimeInMilliseconds", skip_serializing_if = "Option::is_none" )] pub window_time_in_milliseconds: Option, #[serde( rename = "frozenTimeInMilliseconds", skip_serializing_if = "Option::is_none" )] pub frozen_time_in_milliseconds: Option, #[serde(rename = "qtyLimit", skip_serializing_if = "Option::is_none")] pub qty_limit: Option, #[serde(rename = "deltaLimit", skip_serializing_if = "Option::is_none")] pub delta_limit: Option, #[serde(rename = "lastTriggerTime", skip_serializing_if = "Option::is_none")] pub last_trigger_time: Option, } impl GetMarketMakerProtectionConfigResponse { #[must_use] pub fn new() -> GetMarketMakerProtectionConfigResponse { GetMarketMakerProtectionConfigResponse { underlying_id: None, underlying: None, window_time_in_milliseconds: None, frozen_time_in_milliseconds: None, qty_limit: None, delta_limit: None, last_trigger_time: None, } } } src/derivatives_trading_options/rest_api/models/get_option_transaction_history_download_link_by_id_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOptionTransactionHistoryDownloadLinkByIdResponse { #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "notified", skip_serializing_if = "Option::is_none")] pub notified: Option, #[serde( rename = "expirationTimestamp", skip_serializing_if = "Option::is_none" )] pub expiration_timestamp: Option, #[serde(rename = "isExpired", skip_serializing_if = "Option::is_none")] pub is_expired: Option, } impl GetOptionTransactionHistoryDownloadLinkByIdResponse { #[must_use] pub fn new() -> GetOptionTransactionHistoryDownloadLinkByIdResponse { GetOptionTransactionHistoryDownloadLinkByIdResponse { download_id: None, status: None, url: None, notified: None, expiration_timestamp: None, is_expired: None, } } } src/derivatives_trading_options/rest_api/models/historical_exercise_records_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HistoricalExerciseRecordsResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "strikePrice", skip_serializing_if = "Option::is_none")] pub strike_price: Option, #[serde(rename = "realStrikePrice", skip_serializing_if = "Option::is_none")] pub real_strike_price: Option, #[serde(rename = "expiryDate", skip_serializing_if = "Option::is_none")] pub expiry_date: Option, #[serde(rename = "strikeResult", skip_serializing_if = "Option::is_none")] pub strike_result: Option, } impl HistoricalExerciseRecordsResponseInner { #[must_use] pub fn new() -> HistoricalExerciseRecordsResponseInner { HistoricalExerciseRecordsResponseInner { symbol: None, strike_price: None, real_strike_price: None, expiry_date: None, strike_result: None, } } } src/derivatives_trading_options/rest_api/models/kline_candlestick_data_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlineCandlestickDataResponseInner { #[serde(rename = "open", skip_serializing_if = "Option::is_none")] pub open: Option, #[serde(rename = "high", skip_serializing_if = "Option::is_none")] pub high: Option, #[serde(rename = "low", skip_serializing_if = "Option::is_none")] pub low: Option, #[serde(rename = "close", skip_serializing_if = "Option::is_none")] pub close: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "tradeCount", skip_serializing_if = "Option::is_none")] pub trade_count: Option, #[serde(rename = "takerVolume", skip_serializing_if = "Option::is_none")] pub taker_volume: Option, #[serde(rename = "takerAmount", skip_serializing_if = "Option::is_none")] pub taker_amount: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, } impl KlineCandlestickDataResponseInner { #[must_use] pub fn new() -> KlineCandlestickDataResponseInner { KlineCandlestickDataResponseInner { open: None, high: None, low: None, close: None, volume: None, amount: None, interval: None, trade_count: None, taker_volume: None, taker_amount: None, open_time: None, close_time: None, } } } src/derivatives_trading_options/rest_api/models/new_block_trade_order_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewBlockTradeOrderResponse { #[serde( rename = "blockTradeSettlementKey", skip_serializing_if = "Option::is_none" )] pub block_trade_settlement_key: Option, #[serde(rename = "expireTime", skip_serializing_if = "Option::is_none")] pub expire_time: Option, #[serde(rename = "liquidity", skip_serializing_if = "Option::is_none")] pub liquidity: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "legs", skip_serializing_if = "Option::is_none")] pub legs: Option>, } impl NewBlockTradeOrderResponse { #[must_use] pub fn new() -> NewBlockTradeOrderResponse { NewBlockTradeOrderResponse { block_trade_settlement_key: None, expire_time: None, liquidity: None, status: None, legs: None, } } } src/derivatives_trading_options/rest_api/models/new_order_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewOrderResponse { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "createDate", skip_serializing_if = "Option::is_none")] pub create_date: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "postOnly", skip_serializing_if = "Option::is_none")] pub post_only: Option, #[serde(rename = "mmp", skip_serializing_if = "Option::is_none")] pub mmp: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "priceScale", skip_serializing_if = "Option::is_none")] pub price_scale: Option, #[serde(rename = "quantityScale", skip_serializing_if = "Option::is_none")] pub quantity_scale: Option, #[serde(rename = "optionSide", skip_serializing_if = "Option::is_none")] pub option_side: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, } impl NewOrderResponse { #[must_use] pub fn new() -> NewOrderResponse { NewOrderResponse { order_id: None, symbol: None, price: None, quantity: None, side: None, r#type: None, create_date: None, reduce_only: None, post_only: None, mmp: None, executed_qty: None, fee: None, time_in_force: None, create_time: None, update_time: None, status: None, avg_price: None, client_order_id: None, price_scale: None, quantity_scale: None, option_side: None, quote_asset: None, } } } src/derivatives_trading_options/rest_api/models/old_trades_lookup_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OldTradesLookupResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl OldTradesLookupResponseInner { #[must_use] pub fn new() -> OldTradesLookupResponseInner { OldTradesLookupResponseInner { id: None, trade_id: None, price: None, qty: None, quote_qty: None, side: None, time: None, } } } src/derivatives_trading_options/rest_api/models/open_interest_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenInterestResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "sumOpenInterest", skip_serializing_if = "Option::is_none")] pub sum_open_interest: Option, #[serde(rename = "sumOpenInterestUsd", skip_serializing_if = "Option::is_none")] pub sum_open_interest_usd: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl OpenInterestResponseInner { #[must_use] pub fn new() -> OpenInterestResponseInner { OpenInterestResponseInner { symbol: None, sum_open_interest: None, sum_open_interest_usd: None, timestamp: None, } } } src/derivatives_trading_options/rest_api/models/option_account_information_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OptionAccountInformationResponse { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option>, #[serde(rename = "greek", skip_serializing_if = "Option::is_none")] pub greek: Option>, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "riskLevel", skip_serializing_if = "Option::is_none")] pub risk_level: Option, } impl OptionAccountInformationResponse { #[must_use] pub fn new() -> OptionAccountInformationResponse { OptionAccountInformationResponse { asset: None, greek: None, time: None, risk_level: None, } } } src/derivatives_trading_options/rest_api/models/option_account_information_response_asset_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OptionAccountInformationResponseAssetInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "equity", skip_serializing_if = "Option::is_none")] pub equity: Option, #[serde(rename = "available", skip_serializing_if = "Option::is_none")] pub available: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "unrealizedPNL", skip_serializing_if = "Option::is_none")] pub unrealized_pnl: Option, } impl OptionAccountInformationResponseAssetInner { #[must_use] pub fn new() -> OptionAccountInformationResponseAssetInner { OptionAccountInformationResponseAssetInner { asset: None, margin_balance: None, equity: None, available: None, locked: None, unrealized_pnl: None, } } } src/derivatives_trading_options/rest_api/models/option_account_information_response_greek_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OptionAccountInformationResponseGreekInner { #[serde(rename = "underlying", skip_serializing_if = "Option::is_none")] pub underlying: Option, #[serde(rename = "delta", skip_serializing_if = "Option::is_none")] pub delta: Option, #[serde(rename = "gamma", skip_serializing_if = "Option::is_none")] pub gamma: Option, #[serde(rename = "theta", skip_serializing_if = "Option::is_none")] pub theta: Option, #[serde(rename = "vega", skip_serializing_if = "Option::is_none")] pub vega: Option, } impl OptionAccountInformationResponseGreekInner { #[must_use] pub fn new() -> OptionAccountInformationResponseGreekInner { OptionAccountInformationResponseGreekInner { underlying: None, delta: None, gamma: None, theta: None, vega: None, } } } src/derivatives_trading_options/rest_api/models/option_margin_account_information_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OptionMarginAccountInformationResponse { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option>, #[serde(rename = "greek", skip_serializing_if = "Option::is_none")] pub greek: Option>, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl OptionMarginAccountInformationResponse { #[must_use] pub fn new() -> OptionMarginAccountInformationResponse { OptionMarginAccountInformationResponse { asset: None, greek: None, time: None, } } } src/derivatives_trading_options/rest_api/models/option_margin_account_information_response_asset_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OptionMarginAccountInformationResponseAssetInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "equity", skip_serializing_if = "Option::is_none")] pub equity: Option, #[serde(rename = "available", skip_serializing_if = "Option::is_none")] pub available: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "unrealizedPNL", skip_serializing_if = "Option::is_none")] pub unrealized_pnl: Option, #[serde(rename = "adjustedEquity", skip_serializing_if = "Option::is_none")] pub adjusted_equity: Option, } impl OptionMarginAccountInformationResponseAssetInner { #[must_use] pub fn new() -> OptionMarginAccountInformationResponseAssetInner { OptionMarginAccountInformationResponseAssetInner { asset: None, margin_balance: None, equity: None, available: None, initial_margin: None, maint_margin: None, unrealized_pnl: None, adjusted_equity: None, } } } src/derivatives_trading_options/rest_api/models/option_mark_price_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OptionMarkPriceResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "bidIV", skip_serializing_if = "Option::is_none")] pub bid_iv: Option, #[serde(rename = "askIV", skip_serializing_if = "Option::is_none")] pub ask_iv: Option, #[serde(rename = "markIV", skip_serializing_if = "Option::is_none")] pub mark_iv: Option, #[serde(rename = "delta", skip_serializing_if = "Option::is_none")] pub delta: Option, #[serde(rename = "theta", skip_serializing_if = "Option::is_none")] pub theta: Option, #[serde(rename = "gamma", skip_serializing_if = "Option::is_none")] pub gamma: Option, #[serde(rename = "vega", skip_serializing_if = "Option::is_none")] pub vega: Option, #[serde(rename = "highPriceLimit", skip_serializing_if = "Option::is_none")] pub high_price_limit: Option, #[serde(rename = "lowPriceLimit", skip_serializing_if = "Option::is_none")] pub low_price_limit: Option, #[serde(rename = "riskFreeInterest", skip_serializing_if = "Option::is_none")] pub risk_free_interest: Option, } impl OptionMarkPriceResponseInner { #[must_use] pub fn new() -> OptionMarkPriceResponseInner { OptionMarkPriceResponseInner { symbol: None, mark_price: None, bid_iv: None, ask_iv: None, mark_iv: None, delta: None, theta: None, gamma: None, vega: None, high_price_limit: None, low_price_limit: None, risk_free_interest: None, } } } src/derivatives_trading_options/rest_api/models/option_position_information_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OptionPositionInformationResponseInner { #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "reducibleQty", skip_serializing_if = "Option::is_none")] pub reducible_qty: Option, #[serde(rename = "markValue", skip_serializing_if = "Option::is_none")] pub mark_value: Option, #[serde(rename = "ror", skip_serializing_if = "Option::is_none")] pub ror: Option, #[serde(rename = "unrealizedPNL", skip_serializing_if = "Option::is_none")] pub unrealized_pnl: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "strikePrice", skip_serializing_if = "Option::is_none")] pub strike_price: Option, #[serde(rename = "positionCost", skip_serializing_if = "Option::is_none")] pub position_cost: Option, #[serde(rename = "expiryDate", skip_serializing_if = "Option::is_none")] pub expiry_date: Option, #[serde(rename = "priceScale", skip_serializing_if = "Option::is_none")] pub price_scale: Option, #[serde(rename = "quantityScale", skip_serializing_if = "Option::is_none")] pub quantity_scale: Option, #[serde(rename = "optionSide", skip_serializing_if = "Option::is_none")] pub option_side: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, } impl OptionPositionInformationResponseInner { #[must_use] pub fn new() -> OptionPositionInformationResponseInner { OptionPositionInformationResponseInner { entry_price: None, symbol: None, side: None, quantity: None, reducible_qty: None, mark_value: None, ror: None, unrealized_pnl: None, mark_price: None, strike_price: None, position_cost: None, expiry_date: None, price_scale: None, quantity_scale: None, option_side: None, quote_asset: None, } } } src/derivatives_trading_options/rest_api/models/order_book_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderBookResponse { #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "bids", skip_serializing_if = "Option::is_none")] pub bids: Option>>, #[serde(rename = "asks", skip_serializing_if = "Option::is_none")] pub asks: Option>>, } impl OrderBookResponse { #[must_use] pub fn new() -> OrderBookResponse { OrderBookResponse { t_uppercase: None, u: None, bids: None, asks: None, } } } src/derivatives_trading_options/rest_api/models/place_multiple_orders_orders_parameter_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PlaceMultipleOrdersOrdersParameterInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "postOnly", skip_serializing_if = "Option::is_none")] pub post_only: Option, #[serde(rename = "newOrderRespType", skip_serializing_if = "Option::is_none")] pub new_order_resp_type: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "isMmp", skip_serializing_if = "Option::is_none")] pub is_mmp: Option, } impl PlaceMultipleOrdersOrdersParameterInner { #[must_use] pub fn new() -> PlaceMultipleOrdersOrdersParameterInner { PlaceMultipleOrdersOrdersParameterInner { symbol: None, side: None, r#type: None, quantity: None, price: None, time_in_force: None, reduce_only: None, post_only: None, new_order_resp_type: None, client_order_id: None, is_mmp: None, } } } /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum SideEnum { #[serde(rename = "BUY")] Buy, #[serde(rename = "SELL")] Sell, } impl Default for SideEnum { fn default() -> SideEnum { Self::Buy } } /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum TypeEnum { #[serde(rename = "LIMIT")] Limit, } impl Default for TypeEnum { fn default() -> TypeEnum { Self::Limit } } /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum TimeInForceEnum { #[serde(rename = "GTC")] Gtc, #[serde(rename = "IOC")] Ioc, #[serde(rename = "FOK")] Fok, } impl Default for TimeInForceEnum { fn default() -> TimeInForceEnum { Self::Gtc } } /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum NewOrderRespTypeEnum { #[serde(rename = "ACK")] Ack, #[serde(rename = "RESULT")] Result, } impl Default for NewOrderRespTypeEnum { fn default() -> NewOrderRespTypeEnum { Self::Ack } } src/derivatives_trading_options/rest_api/models/place_multiple_orders_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PlaceMultipleOrdersResponseInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "postOnly", skip_serializing_if = "Option::is_none")] pub post_only: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "mmp", skip_serializing_if = "Option::is_none")] pub mmp: Option, } impl PlaceMultipleOrdersResponseInner { #[must_use] pub fn new() -> PlaceMultipleOrdersResponseInner { PlaceMultipleOrdersResponseInner { order_id: None, symbol: None, price: None, quantity: None, side: None, r#type: None, reduce_only: None, post_only: None, client_order_id: None, mmp: None, } } } src/derivatives_trading_options/rest_api/models/query_block_trade_details_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryBlockTradeDetailsResponse { #[serde( rename = "blockTradeSettlementKey", skip_serializing_if = "Option::is_none" )] pub block_trade_settlement_key: Option, #[serde(rename = "expireTime", skip_serializing_if = "Option::is_none")] pub expire_time: Option, #[serde(rename = "liquidity", skip_serializing_if = "Option::is_none")] pub liquidity: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "legs", skip_serializing_if = "Option::is_none")] pub legs: Option>, } impl QueryBlockTradeDetailsResponse { #[must_use] pub fn new() -> QueryBlockTradeDetailsResponse { QueryBlockTradeDetailsResponse { block_trade_settlement_key: None, expire_time: None, liquidity: None, status: None, create_time: None, legs: None, } } } src/derivatives_trading_options/rest_api/models/query_block_trade_details_response_legs_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryBlockTradeDetailsResponseLegsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, } impl QueryBlockTradeDetailsResponseLegsInner { #[must_use] pub fn new() -> QueryBlockTradeDetailsResponseLegsInner { QueryBlockTradeDetailsResponseLegsInner { symbol: None, side: None, quantity: None, price: None, } } } src/derivatives_trading_options/rest_api/models/query_block_trade_order_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryBlockTradeOrderResponseInner { #[serde( rename = "blockTradeSettlementKey", skip_serializing_if = "Option::is_none" )] pub block_trade_settlement_key: Option, #[serde(rename = "expireTime", skip_serializing_if = "Option::is_none")] pub expire_time: Option, #[serde(rename = "liquidity", skip_serializing_if = "Option::is_none")] pub liquidity: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "legs", skip_serializing_if = "Option::is_none")] pub legs: Option>, } impl QueryBlockTradeOrderResponseInner { #[must_use] pub fn new() -> QueryBlockTradeOrderResponseInner { QueryBlockTradeOrderResponseInner { block_trade_settlement_key: None, expire_time: None, liquidity: None, status: None, create_time: None, legs: None, } } } src/derivatives_trading_options/rest_api/models/query_current_open_option_orders_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentOpenOptionOrdersResponseInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "postOnly", skip_serializing_if = "Option::is_none")] pub post_only: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "priceScale", skip_serializing_if = "Option::is_none")] pub price_scale: Option, #[serde(rename = "quantityScale", skip_serializing_if = "Option::is_none")] pub quantity_scale: Option, #[serde(rename = "optionSide", skip_serializing_if = "Option::is_none")] pub option_side: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, #[serde(rename = "mmp", skip_serializing_if = "Option::is_none")] pub mmp: Option, } impl QueryCurrentOpenOptionOrdersResponseInner { #[must_use] pub fn new() -> QueryCurrentOpenOptionOrdersResponseInner { QueryCurrentOpenOptionOrdersResponseInner { order_id: None, symbol: None, price: None, quantity: None, executed_qty: None, fee: None, side: None, r#type: None, time_in_force: None, reduce_only: None, post_only: None, create_time: None, update_time: None, status: None, avg_price: None, client_order_id: None, price_scale: None, quantity_scale: None, option_side: None, quote_asset: None, mmp: None, } } } src/derivatives_trading_options/rest_api/models/query_option_order_history_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryOptionOrderHistoryResponseInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "postOnly", skip_serializing_if = "Option::is_none")] pub post_only: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] pub reason: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "source", skip_serializing_if = "Option::is_none")] pub source: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "priceScale", skip_serializing_if = "Option::is_none")] pub price_scale: Option, #[serde(rename = "quantityScale", skip_serializing_if = "Option::is_none")] pub quantity_scale: Option, #[serde(rename = "optionSide", skip_serializing_if = "Option::is_none")] pub option_side: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, #[serde(rename = "mmp", skip_serializing_if = "Option::is_none")] pub mmp: Option, } impl QueryOptionOrderHistoryResponseInner { #[must_use] pub fn new() -> QueryOptionOrderHistoryResponseInner { QueryOptionOrderHistoryResponseInner { order_id: None, symbol: None, price: None, quantity: None, executed_qty: None, fee: None, side: None, r#type: None, time_in_force: None, reduce_only: None, post_only: None, create_time: None, update_time: None, status: None, reason: None, avg_price: None, source: None, client_order_id: None, price_scale: None, quantity_scale: None, option_side: None, quote_asset: None, mmp: None, } } } src/derivatives_trading_options/rest_api/models/query_single_order_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySingleOrderResponse { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "postOnly", skip_serializing_if = "Option::is_none")] pub post_only: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "source", skip_serializing_if = "Option::is_none")] pub source: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "priceScale", skip_serializing_if = "Option::is_none")] pub price_scale: Option, #[serde(rename = "quantityScale", skip_serializing_if = "Option::is_none")] pub quantity_scale: Option, #[serde(rename = "optionSide", skip_serializing_if = "Option::is_none")] pub option_side: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, #[serde(rename = "mmp", skip_serializing_if = "Option::is_none")] pub mmp: Option, } impl QuerySingleOrderResponse { #[must_use] pub fn new() -> QuerySingleOrderResponse { QuerySingleOrderResponse { order_id: None, symbol: None, price: None, quantity: None, executed_qty: None, fee: None, side: None, r#type: None, time_in_force: None, reduce_only: None, post_only: None, create_time: None, update_time: None, status: None, avg_price: None, source: None, client_order_id: None, price_scale: None, quantity_scale: None, option_side: None, quote_asset: None, mmp: None, } } } src/derivatives_trading_options/rest_api/models/recent_block_trades_list_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RecentBlockTradesListResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl RecentBlockTradesListResponseInner { #[must_use] pub fn new() -> RecentBlockTradesListResponseInner { RecentBlockTradesListResponseInner { id: None, trade_id: None, symbol: None, price: None, qty: None, quote_qty: None, side: None, time: None, } } } src/derivatives_trading_options/rest_api/models/recent_trades_list_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RecentTradesListResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl RecentTradesListResponseInner { #[must_use] pub fn new() -> RecentTradesListResponseInner { RecentTradesListResponseInner { id: None, symbol: None, price: None, qty: None, quote_qty: None, side: None, time: None, } } } src/derivatives_trading_options/rest_api/models/reset_market_maker_protection_config_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ResetMarketMakerProtectionConfigResponse { #[serde(rename = "underlyingId", skip_serializing_if = "Option::is_none")] pub underlying_id: Option, #[serde(rename = "underlying", skip_serializing_if = "Option::is_none")] pub underlying: Option, #[serde( rename = "windowTimeInMilliseconds", skip_serializing_if = "Option::is_none" )] pub window_time_in_milliseconds: Option, #[serde( rename = "frozenTimeInMilliseconds", skip_serializing_if = "Option::is_none" )] pub frozen_time_in_milliseconds: Option, #[serde(rename = "qtyLimit", skip_serializing_if = "Option::is_none")] pub qty_limit: Option, #[serde(rename = "deltaLimit", skip_serializing_if = "Option::is_none")] pub delta_limit: Option, #[serde(rename = "lastTriggerTime", skip_serializing_if = "Option::is_none")] pub last_trigger_time: Option, } impl ResetMarketMakerProtectionConfigResponse { #[must_use] pub fn new() -> ResetMarketMakerProtectionConfigResponse { ResetMarketMakerProtectionConfigResponse { underlying_id: None, underlying: None, window_time_in_milliseconds: None, frozen_time_in_milliseconds: None, qty_limit: None, delta_limit: None, last_trigger_time: None, } } } src/derivatives_trading_options/rest_api/models/set_auto_cancel_all_open_orders_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SetAutoCancelAllOpenOrdersResponse { #[serde(rename = "underlying", skip_serializing_if = "Option::is_none")] pub underlying: Option, #[serde(rename = "countdownTime", skip_serializing_if = "Option::is_none")] pub countdown_time: Option, } impl SetAutoCancelAllOpenOrdersResponse { #[must_use] pub fn new() -> SetAutoCancelAllOpenOrdersResponse { SetAutoCancelAllOpenOrdersResponse { underlying: None, countdown_time: None, } } } src/derivatives_trading_options/rest_api/models/set_market_maker_protection_config_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SetMarketMakerProtectionConfigResponse { #[serde(rename = "underlyingId", skip_serializing_if = "Option::is_none")] pub underlying_id: Option, #[serde(rename = "underlying", skip_serializing_if = "Option::is_none")] pub underlying: Option, #[serde( rename = "windowTimeInMilliseconds", skip_serializing_if = "Option::is_none" )] pub window_time_in_milliseconds: Option, #[serde( rename = "frozenTimeInMilliseconds", skip_serializing_if = "Option::is_none" )] pub frozen_time_in_milliseconds: Option, #[serde(rename = "qtyLimit", skip_serializing_if = "Option::is_none")] pub qty_limit: Option, #[serde(rename = "deltaLimit", skip_serializing_if = "Option::is_none")] pub delta_limit: Option, #[serde(rename = "lastTriggerTime", skip_serializing_if = "Option::is_none")] pub last_trigger_time: Option, } impl SetMarketMakerProtectionConfigResponse { #[must_use] pub fn new() -> SetMarketMakerProtectionConfigResponse { SetMarketMakerProtectionConfigResponse { underlying_id: None, underlying: None, window_time_in_milliseconds: None, frozen_time_in_milliseconds: None, qty_limit: None, delta_limit: None, last_trigger_time: None, } } } src/derivatives_trading_options/rest_api/models/start_user_data_stream_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StartUserDataStreamResponse { #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl StartUserDataStreamResponse { #[must_use] pub fn new() -> StartUserDataStreamResponse { StartUserDataStreamResponse { listen_key: None } } } src/derivatives_trading_options/rest_api/models/symbol_price_ticker_response.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolPriceTickerResponse { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "indexPrice", skip_serializing_if = "Option::is_none")] pub index_price: Option, } impl SymbolPriceTickerResponse { #[must_use] pub fn new() -> SymbolPriceTickerResponse { SymbolPriceTickerResponse { time: None, index_price: None, } } } src/derivatives_trading_options/rest_api/models/ticker24hr_price_change_statistics_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Ticker24hrPriceChangeStatisticsResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "lastQty", skip_serializing_if = "Option::is_none")] pub last_qty: Option, #[serde(rename = "open", skip_serializing_if = "Option::is_none")] pub open: Option, #[serde(rename = "high", skip_serializing_if = "Option::is_none")] pub high: Option, #[serde(rename = "low", skip_serializing_if = "Option::is_none")] pub low: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstTradeId", skip_serializing_if = "Option::is_none")] pub first_trade_id: Option, #[serde(rename = "tradeCount", skip_serializing_if = "Option::is_none")] pub trade_count: Option, #[serde(rename = "strikePrice", skip_serializing_if = "Option::is_none")] pub strike_price: Option, #[serde(rename = "exercisePrice", skip_serializing_if = "Option::is_none")] pub exercise_price: Option, } impl Ticker24hrPriceChangeStatisticsResponseInner { #[must_use] pub fn new() -> Ticker24hrPriceChangeStatisticsResponseInner { Ticker24hrPriceChangeStatisticsResponseInner { symbol: None, price_change: None, price_change_percent: None, last_price: None, last_qty: None, open: None, high: None, low: None, volume: None, amount: None, bid_price: None, ask_price: None, open_time: None, close_time: None, first_trade_id: None, trade_count: None, strike_price: None, exercise_price: None, } } } src/derivatives_trading_options/rest_api/models/user_exercise_record_response_inner.rs /* * Binance Derivatives Trading Options REST API * * OpenAPI Specification for the Binance Derivatives Trading Options REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UserExerciseRecordResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "currency", skip_serializing_if = "Option::is_none")] pub currency: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "exercisePrice", skip_serializing_if = "Option::is_none")] pub exercise_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "createDate", skip_serializing_if = "Option::is_none")] pub create_date: Option, #[serde(rename = "priceScale", skip_serializing_if = "Option::is_none")] pub price_scale: Option, #[serde(rename = "quantityScale", skip_serializing_if = "Option::is_none")] pub quantity_scale: Option, #[serde(rename = "optionSide", skip_serializing_if = "Option::is_none")] pub option_side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, } impl UserExerciseRecordResponseInner { #[must_use] pub fn new() -> UserExerciseRecordResponseInner { UserExerciseRecordResponseInner { id: None, currency: None, symbol: None, exercise_price: None, mark_price: None, quantity: None, amount: None, fee: None, create_date: None, price_scale: None, quantity_scale: None, option_side: None, position_side: None, quote_asset: None, } } } src/derivatives_trading_options/websocket_streams/apis/mod.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod websocket_market_streams_api; pub use websocket_market_streams_api::*; src/derivatives_trading_options/websocket_streams/handle.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ use crate::{common::config::ConfigurationWebsocketStreams, models::WebsocketStreamsConnectConfig}; use super::WebsocketStreams; #[derive(Clone)] pub struct WebsocketStreamsHandle { configuration: ConfigurationWebsocketStreams, } impl WebsocketStreamsHandle { #[must_use] pub fn new(configuration: ConfigurationWebsocketStreams) -> Self { Self { configuration } } /// Connects to a WebSocket stream using default configuration. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let streams = handle.connect().await?; /// pub async fn connect(&self) -> anyhow::Result { self.connect_with_config(Default::default()).await } /// Connects to a WebSocket stream with a custom configuration. /// /// # Arguments /// /// * `cfg` - A configuration object specifying connection details for the WebSocket stream. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let `custom_config` = `WebsocketStreamsConnectConfig::default()`; /// let streams = `handle.connect_with_config(custom_config).await`?; /// pub async fn connect_with_config( &self, cfg: WebsocketStreamsConnectConfig, ) -> anyhow::Result { WebsocketStreams::connect(self.configuration.clone(), cfg.streams, cfg.mode).await } } src/derivatives_trading_options/websocket_streams/models/account_update.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option>, #[serde(rename = "G", skip_serializing_if = "Option::is_none")] pub g_uppercase: Option>, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option>, #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] pub uid: Option, } impl AccountUpdate { #[must_use] pub fn new() -> AccountUpdate { AccountUpdate { e_uppercase: None, b_uppercase: None, g_uppercase: None, p_uppercase: None, uid: None, } } } src/derivatives_trading_options/websocket_streams/models/account_update_b_inner.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateBInner { #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "U", skip_serializing_if = "Option::is_none")] pub u_uppercase: Option, #[serde(rename = "M", skip_serializing_if = "Option::is_none")] pub m_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, } impl AccountUpdateBInner { #[must_use] pub fn new() -> AccountUpdateBInner { AccountUpdateBInner { b: None, m: None, u: None, u_uppercase: None, m_uppercase: None, i: None, a: None, } } } src/derivatives_trading_options/websocket_streams/models/account_update_g_inner.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateGInner { #[serde(rename = "ui", skip_serializing_if = "Option::is_none")] pub ui: Option, #[serde(rename = "d", skip_serializing_if = "Option::is_none")] pub d: Option, #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "g", skip_serializing_if = "Option::is_none")] pub g: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, } impl AccountUpdateGInner { #[must_use] pub fn new() -> AccountUpdateGInner { AccountUpdateGInner { ui: None, d: None, t: None, g: None, v: None, } } } src/derivatives_trading_options/websocket_streams/models/account_update_p_inner.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdatePInner { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, } impl AccountUpdatePInner { #[must_use] pub fn new() -> AccountUpdatePInner { AccountUpdatePInner { s: None, c: None, r: None, p: None, a: None, } } } src/derivatives_trading_options/websocket_streams/models/index_price_streams_response.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndexPriceStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, } impl IndexPriceStreamsResponse { #[must_use] pub fn new() -> IndexPriceStreamsResponse { IndexPriceStreamsResponse { e: None, e_uppercase: None, s: None, p: None, } } } src/derivatives_trading_options/websocket_streams/models/kline_candlestick_streams_response.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlineCandlestickStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "k", skip_serializing_if = "Option::is_none")] pub k: Option>, } impl KlineCandlestickStreamsResponse { #[must_use] pub fn new() -> KlineCandlestickStreamsResponse { KlineCandlestickStreamsResponse { e: None, e_uppercase: None, s: None, k: None, } } } src/derivatives_trading_options/websocket_streams/models/kline_candlestick_streams_response_k.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlineCandlestickStreamsResponseK { #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "F", skip_serializing_if = "Option::is_none")] pub f_uppercase: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "V", skip_serializing_if = "Option::is_none")] pub v_uppercase: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, } impl KlineCandlestickStreamsResponseK { #[must_use] pub fn new() -> KlineCandlestickStreamsResponseK { KlineCandlestickStreamsResponseK { t: None, t_uppercase: None, s: None, i: None, f_uppercase: None, l_uppercase: None, o: None, c: None, h: None, l: None, v: None, n: None, x: None, q: None, v_uppercase: None, q_uppercase: None, } } } src/derivatives_trading_options/websocket_streams/models/mark_price_response_inner.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarkPriceResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "mp", skip_serializing_if = "Option::is_none")] pub mp: Option, } impl MarkPriceResponseInner { #[must_use] pub fn new() -> MarkPriceResponseInner { MarkPriceResponseInner { e: None, e_uppercase: None, s: None, mp: None, } } } src/derivatives_trading_options/websocket_streams/models/mod.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_update; pub use self::account_update::AccountUpdate; pub mod account_update_b_inner; pub use self::account_update_b_inner::AccountUpdateBInner; pub mod account_update_g_inner; pub use self::account_update_g_inner::AccountUpdateGInner; pub mod account_update_p_inner; pub use self::account_update_p_inner::AccountUpdatePInner; pub mod index_price_streams_response; pub use self::index_price_streams_response::IndexPriceStreamsResponse; pub mod kline_candlestick_streams_response; pub use self::kline_candlestick_streams_response::KlineCandlestickStreamsResponse; pub mod kline_candlestick_streams_response_k; pub use self::kline_candlestick_streams_response_k::KlineCandlestickStreamsResponseK; pub mod mark_price_response_inner; pub use self::mark_price_response_inner::MarkPriceResponseInner; pub mod new_symbol_info_response; pub use self::new_symbol_info_response::NewSymbolInfoResponse; pub mod open_interest_response_inner; pub use self::open_interest_response_inner::OpenInterestResponseInner; pub mod order_trade_update; pub use self::order_trade_update::OrderTradeUpdate; pub mod order_trade_update_o_inner; pub use self::order_trade_update_o_inner::OrderTradeUpdateOInner; pub mod order_trade_update_o_inner_fi_inner; pub use self::order_trade_update_o_inner_fi_inner::OrderTradeUpdateOInnerFiInner; pub mod partial_book_depth_streams_response; pub use self::partial_book_depth_streams_response::PartialBookDepthStreamsResponse; pub mod risk_level_change; pub use self::risk_level_change::RiskLevelChange; pub mod ticker24_hour_by_underlying_asset_and_expiration_data_response_inner; pub use self::ticker24_hour_by_underlying_asset_and_expiration_data_response_inner::Ticker24HourByUnderlyingAssetAndExpirationDataResponseInner; pub mod ticker24_hour_response; pub use self::ticker24_hour_response::Ticker24HourResponse; pub mod trade_streams_response; pub use self::trade_streams_response::TradeStreamsResponse; pub mod user_data_stream_events_response; pub use self::user_data_stream_events_response::UserDataStreamEventsResponse; src/derivatives_trading_options/websocket_streams/models/new_symbol_info_response.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewSymbolInfoResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "qa", skip_serializing_if = "Option::is_none")] pub qa: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "unit", skip_serializing_if = "Option::is_none")] pub unit: Option, #[serde(rename = "mq", skip_serializing_if = "Option::is_none")] pub mq: Option, #[serde(rename = "d", skip_serializing_if = "Option::is_none")] pub d: Option, #[serde(rename = "sp", skip_serializing_if = "Option::is_none")] pub sp: Option, #[serde(rename = "ed", skip_serializing_if = "Option::is_none")] pub ed: Option, } impl NewSymbolInfoResponse { #[must_use] pub fn new() -> NewSymbolInfoResponse { NewSymbolInfoResponse { e: None, e_uppercase: None, u: None, qa: None, s: None, unit: None, mq: None, d: None, sp: None, ed: None, } } } src/derivatives_trading_options/websocket_streams/models/open_interest_response_inner.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenInterestResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, } impl OpenInterestResponseInner { #[must_use] pub fn new() -> OpenInterestResponseInner { OpenInterestResponseInner { e: None, e_uppercase: None, s: None, o: None, h: None, } } } src/derivatives_trading_options/websocket_streams/models/order_trade_update.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTradeUpdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option>, } impl OrderTradeUpdate { #[must_use] pub fn new() -> OrderTradeUpdate { OrderTradeUpdate { e_uppercase: None, o: None, } } } src/derivatives_trading_options/websocket_streams/models/order_trade_update_o_inner.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTradeUpdateOInner { #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "oid", skip_serializing_if = "Option::is_none")] pub oid: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "stp", skip_serializing_if = "Option::is_none")] pub stp: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, #[serde(rename = "po", skip_serializing_if = "Option::is_none")] pub po: Option, #[serde(rename = "S", skip_serializing_if = "Option::is_none")] pub s_uppercase: Option, #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "ec", skip_serializing_if = "Option::is_none")] pub ec: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "tif", skip_serializing_if = "Option::is_none")] pub tif: Option, #[serde(rename = "oty", skip_serializing_if = "Option::is_none")] pub oty: Option, #[serde(rename = "fi", skip_serializing_if = "Option::is_none")] pub fi: Option>, } impl OrderTradeUpdateOInner { #[must_use] pub fn new() -> OrderTradeUpdateOInner { OrderTradeUpdateOInner { t_uppercase: None, t: None, s: None, c: None, oid: None, p: None, q: None, stp: None, r: None, po: None, s_uppercase: None, e: None, ec: None, f: None, tif: None, oty: None, fi: None, } } } src/derivatives_trading_options/websocket_streams/models/order_trade_update_o_inner_fi_inner.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTradeUpdateOInnerFiInner { #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, } impl OrderTradeUpdateOInnerFiInner { #[must_use] pub fn new() -> OrderTradeUpdateOInnerFiInner { OrderTradeUpdateOInnerFiInner { t: None, p: None, q: None, t_uppercase: None, m: None, f: None, } } } src/derivatives_trading_options/websocket_streams/models/partial_book_depth_streams_response.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PartialBookDepthStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "pu", skip_serializing_if = "Option::is_none")] pub pu: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option>>, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option>>, } impl PartialBookDepthStreamsResponse { #[must_use] pub fn new() -> PartialBookDepthStreamsResponse { PartialBookDepthStreamsResponse { e: None, e_uppercase: None, t_uppercase: None, s: None, u: None, pu: None, b: None, a: None, } } } src/derivatives_trading_options/websocket_streams/models/risk_level_change.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RiskLevelChange { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "mb", skip_serializing_if = "Option::is_none")] pub mb: Option, #[serde(rename = "mm", skip_serializing_if = "Option::is_none")] pub mm: Option, } impl RiskLevelChange { #[must_use] pub fn new() -> RiskLevelChange { RiskLevelChange { e_uppercase: None, s: None, mb: None, mm: None, } } } src/derivatives_trading_options/websocket_streams/models/trade_streams_response.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TradeStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "S", skip_serializing_if = "Option::is_none")] pub s_uppercase: Option, #[serde(rename = "X", skip_serializing_if = "Option::is_none")] pub x_uppercase: Option, } impl TradeStreamsResponse { #[must_use] pub fn new() -> TradeStreamsResponse { TradeStreamsResponse { e: None, e_uppercase: None, s: None, t: None, p: None, q: None, b: None, a: None, t_uppercase: None, s_uppercase: None, x_uppercase: None, } } } src/derivatives_trading_options/websocket_streams/models/user_data_stream_events_response.rs /* * Binance Derivatives Trading Options WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Options WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_options::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(try_from = "Value")] pub enum UserDataStreamEventsResponse { #[serde(rename = "ACCOUNT_UPDATE")] AccountUpdate(Box), #[serde(rename = "ORDER_TRADE_UPDATE")] OrderTradeUpdate(Box), #[serde(rename = "RISK_LEVEL_CHANGE")] RiskLevelChange(Box), Other(serde_json::Value), } impl Default for UserDataStreamEventsResponse { fn default() -> Self { Self::AccountUpdate(Default::default()) } } impl TryFrom for UserDataStreamEventsResponse { type Error = serde_json::Error; fn try_from(v: Value) -> Result { let tag = v .get("e") .and_then(Value::as_str) .ok_or_else(|| serde_json::Error::custom("missing field `e`"))?; match tag { "ACCOUNT_UPDATE" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::AccountUpdate(Box::new( payload, ))) } "ORDER_TRADE_UPDATE" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::OrderTradeUpdate(Box::new( payload, ))) } "RISK_LEVEL_CHANGE" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::RiskLevelChange(Box::new( payload, ))) } _ => Ok(UserDataStreamEventsResponse::Other(v)), } } } src/derivatives_trading_portfolio_margin/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::derivatives_trading_portfolio_margin; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi::production(configuration); let params = derivatives_trading_portfolio_margin::rest_api::AccountInformationParams::default(); let response = client.account_information(params).await?; ``` src/derivatives_trading_portfolio_margin/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::derivatives_trading_portfolio_margin; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi::production(configuration); let params = derivatives_trading_portfolio_margin::rest_api::AccountInformationParams::default(); let response = client.account_information(params).await?; ``` src/derivatives_trading_portfolio_margin/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::derivatives_trading_portfolio_margin; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi::production(configuration); let params = derivatives_trading_portfolio_margin::rest_api::AccountInformationParams::default(); match client.account_information(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/derivatives_trading_portfolio_margin/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::derivatives_trading_portfolio_margin; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi::production(configuration); let params = derivatives_trading_portfolio_margin::rest_api::AccountInformationParams::default(); let response = client.account_information(params).await?; ``` src/derivatives_trading_portfolio_margin/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::derivatives_trading_portfolio_margin; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi::production(configuration); let params = derivatives_trading_portfolio_margin::rest_api::AccountInformationParams::default(); let response = client.account_information(params).await?; ``` src/derivatives_trading_portfolio_margin/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::derivatives_trading_portfolio_margin; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi::production(configuration); let params = derivatives_trading_portfolio_margin::rest_api::AccountInformationParams::default(); let response = client.account_information(params).await?; ``` src/derivatives_trading_portfolio_margin/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::derivatives_trading_portfolio_margin; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi::production(configuration); let params = derivatives_trading_portfolio_margin::rest_api::AccountInformationParams::default(); let response = client.account_information(params).await?; ``` src/derivatives_trading_portfolio_margin/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::derivatives_trading_portfolio_margin; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi::production(configuration); let params = derivatives_trading_portfolio_margin::rest_api::AccountInformationParams::default(); let response = client.account_information(params).await?; ``` src/derivatives_trading_portfolio_margin/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::derivatives_trading_portfolio_margin; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = derivatives_trading_portfolio_margin::DerivativesTradingPortfolioMarginRestApi::production(configuration); let params = derivatives_trading_portfolio_margin::rest_api::AccountInformationParams::default(); let response = client.account_information(params).await?; ``` src/derivatives_trading_portfolio_margin/rest_api/apis/mod.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod market_data_api; pub use market_data_api::*; pub mod trade_api; pub use trade_api::*; pub mod user_data_streams_api; pub use user_data_streams_api::*; src/derivatives_trading_portfolio_margin/rest_api/models/account_balance_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum AccountBalanceResponse { AccountBalanceResponse1(Vec), AccountBalanceResponse2(Box), Other(serde_json::Value), } impl Default for AccountBalanceResponse { fn default() -> Self { Self::AccountBalanceResponse1(Default::default()) } } src/derivatives_trading_portfolio_margin/rest_api/models/account_balance_response1_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountBalanceResponse1Inner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde(rename = "crossMarginAsset", skip_serializing_if = "Option::is_none")] pub cross_margin_asset: Option, #[serde( rename = "crossMarginBorrowed", skip_serializing_if = "Option::is_none" )] pub cross_margin_borrowed: Option, #[serde(rename = "crossMarginFree", skip_serializing_if = "Option::is_none")] pub cross_margin_free: Option, #[serde( rename = "crossMarginInterest", skip_serializing_if = "Option::is_none" )] pub cross_margin_interest: Option, #[serde(rename = "crossMarginLocked", skip_serializing_if = "Option::is_none")] pub cross_margin_locked: Option, #[serde(rename = "umWalletBalance", skip_serializing_if = "Option::is_none")] pub um_wallet_balance: Option, #[serde(rename = "umUnrealizedPNL", skip_serializing_if = "Option::is_none")] pub um_unrealized_pnl: Option, #[serde(rename = "cmWalletBalance", skip_serializing_if = "Option::is_none")] pub cm_wallet_balance: Option, #[serde(rename = "cmUnrealizedPNL", skip_serializing_if = "Option::is_none")] pub cm_unrealized_pnl: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "negativeBalance", skip_serializing_if = "Option::is_none")] pub negative_balance: Option, } impl AccountBalanceResponse1Inner { #[must_use] pub fn new() -> AccountBalanceResponse1Inner { AccountBalanceResponse1Inner { asset: None, total_wallet_balance: None, cross_margin_asset: None, cross_margin_borrowed: None, cross_margin_free: None, cross_margin_interest: None, cross_margin_locked: None, um_wallet_balance: None, um_unrealized_pnl: None, cm_wallet_balance: None, cm_unrealized_pnl: None, update_time: None, negative_balance: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/account_balance_response2.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountBalanceResponse2 { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde( rename = "crossMarginBorrowed", skip_serializing_if = "Option::is_none" )] pub cross_margin_borrowed: Option, #[serde(rename = "crossMarginFree", skip_serializing_if = "Option::is_none")] pub cross_margin_free: Option, #[serde( rename = "crossMarginInterest", skip_serializing_if = "Option::is_none" )] pub cross_margin_interest: Option, #[serde(rename = "crossMarginLocked", skip_serializing_if = "Option::is_none")] pub cross_margin_locked: Option, #[serde(rename = "umWalletBalance", skip_serializing_if = "Option::is_none")] pub um_wallet_balance: Option, #[serde(rename = "umUnrealizedPNL", skip_serializing_if = "Option::is_none")] pub um_unrealized_pnl: Option, #[serde(rename = "cmWalletBalance", skip_serializing_if = "Option::is_none")] pub cm_wallet_balance: Option, #[serde(rename = "cmUnrealizedPNL", skip_serializing_if = "Option::is_none")] pub cm_unrealized_pnl: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "negativeBalance", skip_serializing_if = "Option::is_none")] pub negative_balance: Option, } impl AccountBalanceResponse2 { #[must_use] pub fn new() -> AccountBalanceResponse2 { AccountBalanceResponse2 { asset: None, total_wallet_balance: None, cross_margin_borrowed: None, cross_margin_free: None, cross_margin_interest: None, cross_margin_locked: None, um_wallet_balance: None, um_unrealized_pnl: None, cm_wallet_balance: None, cm_unrealized_pnl: None, update_time: None, negative_balance: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/account_information_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponse { #[serde(rename = "uniMMR", skip_serializing_if = "Option::is_none")] pub uni_mmr: Option, #[serde(rename = "accountEquity", skip_serializing_if = "Option::is_none")] pub account_equity: Option, #[serde(rename = "actualEquity", skip_serializing_if = "Option::is_none")] pub actual_equity: Option, #[serde( rename = "accountInitialMargin", skip_serializing_if = "Option::is_none" )] pub account_initial_margin: Option, #[serde(rename = "accountMaintMargin", skip_serializing_if = "Option::is_none")] pub account_maint_margin: Option, #[serde(rename = "accountStatus", skip_serializing_if = "Option::is_none")] pub account_status: Option, #[serde( rename = "virtualMaxWithdrawAmount", skip_serializing_if = "Option::is_none" )] pub virtual_max_withdraw_amount: Option, #[serde( rename = "totalAvailableBalance", skip_serializing_if = "Option::is_none" )] pub total_available_balance: Option, #[serde( rename = "totalMarginOpenLoss", skip_serializing_if = "Option::is_none" )] pub total_margin_open_loss: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountInformationResponse { #[must_use] pub fn new() -> AccountInformationResponse { AccountInformationResponse { uni_mmr: None, account_equity: None, actual_equity: None, account_initial_margin: None, account_maint_margin: None, account_status: None, virtual_max_withdraw_amount: None, total_available_balance: None, total_margin_open_loss: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/bnb_transfer_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct BnbTransferResponse { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl BnbTransferResponse { #[must_use] pub fn new() -> BnbTransferResponse { BnbTransferResponse { tran_id: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_all_cm_open_conditional_orders_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAllCmOpenConditionalOrdersResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAllCmOpenConditionalOrdersResponse { #[must_use] pub fn new() -> CancelAllCmOpenConditionalOrdersResponse { CancelAllCmOpenConditionalOrdersResponse { code: None, msg: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_all_cm_open_orders_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAllCmOpenOrdersResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAllCmOpenOrdersResponse { #[must_use] pub fn new() -> CancelAllCmOpenOrdersResponse { CancelAllCmOpenOrdersResponse { code: None, msg: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_all_um_open_conditional_orders_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAllUmOpenConditionalOrdersResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAllUmOpenConditionalOrdersResponse { #[must_use] pub fn new() -> CancelAllUmOpenConditionalOrdersResponse { CancelAllUmOpenConditionalOrdersResponse { code: None, msg: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_all_um_open_orders_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAllUmOpenOrdersResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAllUmOpenOrdersResponse { #[must_use] pub fn new() -> CancelAllUmOpenOrdersResponse { CancelAllUmOpenOrdersResponse { code: None, msg: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_cm_conditional_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelCmConditionalOrderResponse { #[serde( rename = "newClientStrategyId", skip_serializing_if = "Option::is_none" )] pub new_client_strategy_id: Option, #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] pub strategy_id: Option, #[serde(rename = "strategyStatus", skip_serializing_if = "Option::is_none")] pub strategy_status: Option, #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] pub strategy_type: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "activatePrice", skip_serializing_if = "Option::is_none")] pub activate_price: Option, #[serde(rename = "priceRate", skip_serializing_if = "Option::is_none")] pub price_rate: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "workingType", skip_serializing_if = "Option::is_none")] pub working_type: Option, #[serde(rename = "priceProtect", skip_serializing_if = "Option::is_none")] pub price_protect: Option, } impl CancelCmConditionalOrderResponse { #[must_use] pub fn new() -> CancelCmConditionalOrderResponse { CancelCmConditionalOrderResponse { new_client_strategy_id: None, strategy_id: None, strategy_status: None, strategy_type: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, stop_price: None, symbol: None, time_in_force: None, activate_price: None, price_rate: None, book_time: None, update_time: None, working_type: None, price_protect: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_cm_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelCmOrderResponse { #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "cumQty", skip_serializing_if = "Option::is_none")] pub cum_qty: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl CancelCmOrderResponse { #[must_use] pub fn new() -> CancelCmOrderResponse { CancelCmOrderResponse { avg_price: None, client_order_id: None, cum_qty: None, cum_base: None, executed_qty: None, order_id: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, status: None, symbol: None, pair: None, time_in_force: None, r#type: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_all_open_orders_on_a_symbol_response_inner_order_reports_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, } impl CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner { #[must_use] pub fn new() -> CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner { CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrderReportsInner { symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, iceberg_qty: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_all_open_orders_on_a_symbol_response_inner_orders_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner { #[must_use] pub fn new() -> CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner { CancelMarginAccountAllOpenOrdersOnASymbolResponseInnerOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_oco_orders_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelMarginAccountOcoOrdersResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl CancelMarginAccountOcoOrdersResponse { #[must_use] pub fn new() -> CancelMarginAccountOcoOrdersResponse { CancelMarginAccountOcoOrdersResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_oco_orders_response_order_reports_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelMarginAccountOcoOrdersResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, } impl CancelMarginAccountOcoOrdersResponseOrderReportsInner { #[must_use] pub fn new() -> CancelMarginAccountOcoOrdersResponseOrderReportsInner { CancelMarginAccountOcoOrdersResponseOrderReportsInner { symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_oco_orders_response_orders_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelMarginAccountOcoOrdersResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl CancelMarginAccountOcoOrdersResponseOrdersInner { #[must_use] pub fn new() -> CancelMarginAccountOcoOrdersResponseOrdersInner { CancelMarginAccountOcoOrdersResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelMarginAccountOrderResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, } impl CancelMarginAccountOrderResponse { #[must_use] pub fn new() -> CancelMarginAccountOrderResponse { CancelMarginAccountOrderResponse { symbol: None, order_id: None, orig_client_order_id: None, client_order_id: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_um_conditional_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelUmConditionalOrderResponse { #[serde( rename = "newClientStrategyId", skip_serializing_if = "Option::is_none" )] pub new_client_strategy_id: Option, #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] pub strategy_id: Option, #[serde(rename = "strategyStatus", skip_serializing_if = "Option::is_none")] pub strategy_status: Option, #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] pub strategy_type: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "activatePrice", skip_serializing_if = "Option::is_none")] pub activate_price: Option, #[serde(rename = "priceRate", skip_serializing_if = "Option::is_none")] pub price_rate: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "workingType", skip_serializing_if = "Option::is_none")] pub working_type: Option, #[serde(rename = "priceProtect", skip_serializing_if = "Option::is_none")] pub price_protect: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "goodTillDate", skip_serializing_if = "Option::is_none")] pub good_till_date: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl CancelUmConditionalOrderResponse { #[must_use] pub fn new() -> CancelUmConditionalOrderResponse { CancelUmConditionalOrderResponse { new_client_strategy_id: None, strategy_id: None, strategy_status: None, strategy_type: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, stop_price: None, symbol: None, time_in_force: None, activate_price: None, price_rate: None, book_time: None, update_time: None, working_type: None, price_protect: None, self_trade_prevention_mode: None, good_till_date: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cancel_um_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelUmOrderResponse { #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "cumQty", skip_serializing_if = "Option::is_none")] pub cum_qty: Option, #[serde(rename = "cumQuote", skip_serializing_if = "Option::is_none")] pub cum_quote: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "goodTillDate", skip_serializing_if = "Option::is_none")] pub good_till_date: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl CancelUmOrderResponse { #[must_use] pub fn new() -> CancelUmOrderResponse { CancelUmOrderResponse { avg_price: None, client_order_id: None, cum_qty: None, cum_quote: None, executed_qty: None, order_id: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, status: None, symbol: None, time_in_force: None, r#type: None, update_time: None, self_trade_prevention_mode: None, good_till_date: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/change_auto_repay_futures_status_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeAutoRepayFuturesStatusResponse { #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ChangeAutoRepayFuturesStatusResponse { #[must_use] pub fn new() -> ChangeAutoRepayFuturesStatusResponse { ChangeAutoRepayFuturesStatusResponse { msg: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/change_cm_initial_leverage_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeCmInitialLeverageResponse { #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, } impl ChangeCmInitialLeverageResponse { #[must_use] pub fn new() -> ChangeCmInitialLeverageResponse { ChangeCmInitialLeverageResponse { leverage: None, max_qty: None, symbol: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/change_cm_position_mode_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeCmPositionModeResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ChangeCmPositionModeResponse { #[must_use] pub fn new() -> ChangeCmPositionModeResponse { ChangeCmPositionModeResponse { code: None, msg: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/change_um_initial_leverage_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeUmInitialLeverageResponse { #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "maxNotionalValue", skip_serializing_if = "Option::is_none")] pub max_notional_value: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, } impl ChangeUmInitialLeverageResponse { #[must_use] pub fn new() -> ChangeUmInitialLeverageResponse { ChangeUmInitialLeverageResponse { leverage: None, max_notional_value: None, symbol: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/change_um_position_mode_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeUmPositionModeResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ChangeUmPositionModeResponse { #[must_use] pub fn new() -> ChangeUmPositionModeResponse { ChangeUmPositionModeResponse { code: None, msg: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cm_account_trade_list_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CmAccountTradeListResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "realizedPnl", skip_serializing_if = "Option::is_none")] pub realized_pnl: Option, #[serde(rename = "marginAsset", skip_serializing_if = "Option::is_none")] pub margin_asset: Option, #[serde(rename = "baseQty", skip_serializing_if = "Option::is_none")] pub base_qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, } impl CmAccountTradeListResponseInner { #[must_use] pub fn new() -> CmAccountTradeListResponseInner { CmAccountTradeListResponseInner { symbol: None, id: None, order_id: None, pair: None, side: None, price: None, qty: None, realized_pnl: None, margin_asset: None, base_qty: None, commission: None, commission_asset: None, time: None, position_side: None, buyer: None, maker: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cm_notional_and_leverage_brackets_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CmNotionalAndLeverageBracketsResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "brackets", skip_serializing_if = "Option::is_none")] pub brackets: Option>, } impl CmNotionalAndLeverageBracketsResponseInner { #[must_use] pub fn new() -> CmNotionalAndLeverageBracketsResponseInner { CmNotionalAndLeverageBracketsResponseInner { symbol: None, brackets: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cm_notional_and_leverage_brackets_response_inner_brackets_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CmNotionalAndLeverageBracketsResponseInnerBracketsInner { #[serde(rename = "bracket", skip_serializing_if = "Option::is_none")] pub bracket: Option, #[serde(rename = "initialLeverage", skip_serializing_if = "Option::is_none")] pub initial_leverage: Option, #[serde(rename = "qtyCap", skip_serializing_if = "Option::is_none")] pub qty_cap: Option, #[serde(rename = "qtyFloor", skip_serializing_if = "Option::is_none")] pub qty_floor: Option, #[serde(rename = "maintMarginRatio", skip_serializing_if = "Option::is_none")] pub maint_margin_ratio: Option, #[serde(rename = "cum", skip_serializing_if = "Option::is_none")] pub cum: Option, } impl CmNotionalAndLeverageBracketsResponseInnerBracketsInner { #[must_use] pub fn new() -> CmNotionalAndLeverageBracketsResponseInnerBracketsInner { CmNotionalAndLeverageBracketsResponseInnerBracketsInner { bracket: None, initial_leverage: None, qty_cap: None, qty_floor: None, maint_margin_ratio: None, cum: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cm_position_adl_quantile_estimation_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CmPositionAdlQuantileEstimationResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "adlQuantile", skip_serializing_if = "Option::is_none")] pub adl_quantile: Option>, } impl CmPositionAdlQuantileEstimationResponseInner { #[must_use] pub fn new() -> CmPositionAdlQuantileEstimationResponseInner { CmPositionAdlQuantileEstimationResponseInner { symbol: None, adl_quantile: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/cm_position_adl_quantile_estimation_response_inner_adl_quantile.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CmPositionAdlQuantileEstimationResponseInnerAdlQuantile { #[serde(rename = "LONG", skip_serializing_if = "Option::is_none")] pub long: Option, #[serde(rename = "SHORT", skip_serializing_if = "Option::is_none")] pub short: Option, #[serde(rename = "HEDGE", skip_serializing_if = "Option::is_none")] pub hedge: Option, #[serde(rename = "BOTH", skip_serializing_if = "Option::is_none")] pub both: Option, } impl CmPositionAdlQuantileEstimationResponseInnerAdlQuantile { #[must_use] pub fn new() -> CmPositionAdlQuantileEstimationResponseInnerAdlQuantile { CmPositionAdlQuantileEstimationResponseInnerAdlQuantile { long: None, short: None, hedge: None, both: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/fund_auto_collection_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FundAutoCollectionResponse { #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl FundAutoCollectionResponse { #[must_use] pub fn new() -> FundAutoCollectionResponse { FundAutoCollectionResponse { msg: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/fund_collection_by_asset_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FundCollectionByAssetResponse { #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl FundCollectionByAssetResponse { #[must_use] pub fn new() -> FundCollectionByAssetResponse { FundCollectionByAssetResponse { msg: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_auto_repay_futures_status_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAutoRepayFuturesStatusResponse { #[serde(rename = "autoRepay", skip_serializing_if = "Option::is_none")] pub auto_repay: Option, } impl GetAutoRepayFuturesStatusResponse { #[must_use] pub fn new() -> GetAutoRepayFuturesStatusResponse { GetAutoRepayFuturesStatusResponse { auto_repay: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_cm_account_detail_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCmAccountDetailResponse { #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "positions", skip_serializing_if = "Option::is_none")] pub positions: Option>, } impl GetCmAccountDetailResponse { #[must_use] pub fn new() -> GetCmAccountDetailResponse { GetCmAccountDetailResponse { assets: None, positions: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_cm_account_detail_response_assets_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCmAccountDetailResponseAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl GetCmAccountDetailResponseAssetsInner { #[must_use] pub fn new() -> GetCmAccountDetailResponseAssetsInner { GetCmAccountDetailResponseAssetsInner { asset: None, cross_wallet_balance: None, cross_un_pnl: None, maint_margin: None, initial_margin: None, position_initial_margin: None, open_order_initial_margin: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_cm_account_detail_response_positions_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCmAccountDetailResponsePositionsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl GetCmAccountDetailResponsePositionsInner { #[must_use] pub fn new() -> GetCmAccountDetailResponsePositionsInner { GetCmAccountDetailResponsePositionsInner { symbol: None, position_amt: None, initial_margin: None, maint_margin: None, unrealized_profit: None, position_initial_margin: None, open_order_initial_margin: None, leverage: None, position_side: None, entry_price: None, max_qty: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_cm_current_position_mode_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCmCurrentPositionModeResponse { #[serde(rename = "dualSidePosition", skip_serializing_if = "Option::is_none")] pub dual_side_position: Option, } impl GetCmCurrentPositionModeResponse { #[must_use] pub fn new() -> GetCmCurrentPositionModeResponse { GetCmCurrentPositionModeResponse { dual_side_position: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_cm_income_history_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCmIncomeHistoryResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "incomeType", skip_serializing_if = "Option::is_none")] pub income_type: Option, #[serde(rename = "income", skip_serializing_if = "Option::is_none")] pub income: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, } impl GetCmIncomeHistoryResponseInner { #[must_use] pub fn new() -> GetCmIncomeHistoryResponseInner { GetCmIncomeHistoryResponseInner { symbol: None, income_type: None, income: None, asset: None, info: None, time: None, tran_id: None, trade_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_download_id_for_um_futures_order_history_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDownloadIdForUmFuturesOrderHistoryResponse { #[serde( rename = "avgCostTimestampOfLast30d", skip_serializing_if = "Option::is_none" )] pub avg_cost_timestamp_of_last30d: Option, #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, } impl GetDownloadIdForUmFuturesOrderHistoryResponse { #[must_use] pub fn new() -> GetDownloadIdForUmFuturesOrderHistoryResponse { GetDownloadIdForUmFuturesOrderHistoryResponse { avg_cost_timestamp_of_last30d: None, download_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_download_id_for_um_futures_trade_history_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDownloadIdForUmFuturesTradeHistoryResponse { #[serde( rename = "avgCostTimestampOfLast30d", skip_serializing_if = "Option::is_none" )] pub avg_cost_timestamp_of_last30d: Option, #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, } impl GetDownloadIdForUmFuturesTradeHistoryResponse { #[must_use] pub fn new() -> GetDownloadIdForUmFuturesTradeHistoryResponse { GetDownloadIdForUmFuturesTradeHistoryResponse { avg_cost_timestamp_of_last30d: None, download_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_download_id_for_um_futures_transaction_history_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDownloadIdForUmFuturesTransactionHistoryResponse { #[serde( rename = "avgCostTimestampOfLast30d", skip_serializing_if = "Option::is_none" )] pub avg_cost_timestamp_of_last30d: Option, #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, } impl GetDownloadIdForUmFuturesTransactionHistoryResponse { #[must_use] pub fn new() -> GetDownloadIdForUmFuturesTransactionHistoryResponse { GetDownloadIdForUmFuturesTransactionHistoryResponse { avg_cost_timestamp_of_last30d: None, download_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_margin_borrow_loan_interest_history_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetMarginBorrowLoanInterestHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetMarginBorrowLoanInterestHistoryResponse { #[must_use] pub fn new() -> GetMarginBorrowLoanInterestHistoryResponse { GetMarginBorrowLoanInterestHistoryResponse { rows: None, total: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_margin_borrow_loan_interest_history_response_rows_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetMarginBorrowLoanInterestHistoryResponseRowsInner { #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde( rename = "interestAccuredTime", skip_serializing_if = "Option::is_none" )] pub interest_accured_time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "rawAsset", skip_serializing_if = "Option::is_none")] pub raw_asset: Option, #[serde(rename = "principal", skip_serializing_if = "Option::is_none")] pub principal: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "interestRate", skip_serializing_if = "Option::is_none")] pub interest_rate: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, } impl GetMarginBorrowLoanInterestHistoryResponseRowsInner { #[must_use] pub fn new() -> GetMarginBorrowLoanInterestHistoryResponseRowsInner { GetMarginBorrowLoanInterestHistoryResponseRowsInner { tx_id: None, interest_accured_time: None, asset: None, raw_asset: None, principal: None, interest: None, interest_rate: None, r#type: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_account_detail_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmAccountDetailResponse { #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "positions", skip_serializing_if = "Option::is_none")] pub positions: Option>, } impl GetUmAccountDetailResponse { #[must_use] pub fn new() -> GetUmAccountDetailResponse { GetUmAccountDetailResponse { assets: None, positions: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_account_detail_response_positions_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmAccountDetailResponsePositionsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "maxNotional", skip_serializing_if = "Option::is_none")] pub max_notional: Option, #[serde(rename = "bidNotional", skip_serializing_if = "Option::is_none")] pub bid_notional: Option, #[serde(rename = "askNotional", skip_serializing_if = "Option::is_none")] pub ask_notional: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl GetUmAccountDetailResponsePositionsInner { #[must_use] pub fn new() -> GetUmAccountDetailResponsePositionsInner { GetUmAccountDetailResponsePositionsInner { symbol: None, initial_margin: None, maint_margin: None, unrealized_profit: None, position_initial_margin: None, open_order_initial_margin: None, leverage: None, entry_price: None, max_notional: None, bid_notional: None, ask_notional: None, position_side: None, position_amt: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_account_detail_v2_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmAccountDetailV2Response { #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "positions", skip_serializing_if = "Option::is_none")] pub positions: Option>, } impl GetUmAccountDetailV2Response { #[must_use] pub fn new() -> GetUmAccountDetailV2Response { GetUmAccountDetailV2Response { assets: None, positions: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_account_detail_v2_response_assets_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmAccountDetailV2ResponseAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl GetUmAccountDetailV2ResponseAssetsInner { #[must_use] pub fn new() -> GetUmAccountDetailV2ResponseAssetsInner { GetUmAccountDetailV2ResponseAssetsInner { asset: None, cross_wallet_balance: None, cross_un_pnl: None, maint_margin: None, initial_margin: None, position_initial_margin: None, open_order_initial_margin: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_account_detail_v2_response_positions_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmAccountDetailV2ResponsePositionsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "notional", skip_serializing_if = "Option::is_none")] pub notional: Option, } impl GetUmAccountDetailV2ResponsePositionsInner { #[must_use] pub fn new() -> GetUmAccountDetailV2ResponsePositionsInner { GetUmAccountDetailV2ResponsePositionsInner { symbol: None, initial_margin: None, maint_margin: None, unrealized_profit: None, position_side: None, position_amt: None, update_time: None, notional: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_current_position_mode_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmCurrentPositionModeResponse { #[serde(rename = "dualSidePosition", skip_serializing_if = "Option::is_none")] pub dual_side_position: Option, } impl GetUmCurrentPositionModeResponse { #[must_use] pub fn new() -> GetUmCurrentPositionModeResponse { GetUmCurrentPositionModeResponse { dual_side_position: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_futures_bnb_burn_status_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmFuturesBnbBurnStatusResponse { #[serde(rename = "feeBurn", skip_serializing_if = "Option::is_none")] pub fee_burn: Option, } impl GetUmFuturesBnbBurnStatusResponse { #[must_use] pub fn new() -> GetUmFuturesBnbBurnStatusResponse { GetUmFuturesBnbBurnStatusResponse { fee_burn: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_futures_order_download_link_by_id_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmFuturesOrderDownloadLinkByIdResponse { #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "s3Link", skip_serializing_if = "Option::is_none")] pub s3_link: Option, #[serde(rename = "notified", skip_serializing_if = "Option::is_none")] pub notified: Option, #[serde( rename = "expirationTimestamp", skip_serializing_if = "Option::is_none" )] pub expiration_timestamp: Option, #[serde(rename = "isExpired", skip_serializing_if = "Option::is_none")] pub is_expired: Option, } impl GetUmFuturesOrderDownloadLinkByIdResponse { #[must_use] pub fn new() -> GetUmFuturesOrderDownloadLinkByIdResponse { GetUmFuturesOrderDownloadLinkByIdResponse { download_id: None, status: None, url: None, s3_link: None, notified: None, expiration_timestamp: None, is_expired: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_futures_trade_download_link_by_id_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmFuturesTradeDownloadLinkByIdResponse { #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "s3Link", skip_serializing_if = "Option::is_none")] pub s3_link: Option, #[serde(rename = "notified", skip_serializing_if = "Option::is_none")] pub notified: Option, #[serde( rename = "expirationTimestamp", skip_serializing_if = "Option::is_none" )] pub expiration_timestamp: Option, #[serde(rename = "isExpired", skip_serializing_if = "Option::is_none")] pub is_expired: Option, } impl GetUmFuturesTradeDownloadLinkByIdResponse { #[must_use] pub fn new() -> GetUmFuturesTradeDownloadLinkByIdResponse { GetUmFuturesTradeDownloadLinkByIdResponse { download_id: None, status: None, url: None, s3_link: None, notified: None, expiration_timestamp: None, is_expired: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_futures_transaction_download_link_by_id_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmFuturesTransactionDownloadLinkByIdResponse { #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "s3Link", skip_serializing_if = "Option::is_none")] pub s3_link: Option, #[serde(rename = "notified", skip_serializing_if = "Option::is_none")] pub notified: Option, #[serde( rename = "expirationTimestamp", skip_serializing_if = "Option::is_none" )] pub expiration_timestamp: Option, #[serde(rename = "isExpired", skip_serializing_if = "Option::is_none")] pub is_expired: Option, } impl GetUmFuturesTransactionDownloadLinkByIdResponse { #[must_use] pub fn new() -> GetUmFuturesTransactionDownloadLinkByIdResponse { GetUmFuturesTransactionDownloadLinkByIdResponse { download_id: None, status: None, url: None, s3_link: None, notified: None, expiration_timestamp: None, is_expired: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_um_income_history_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUmIncomeHistoryResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "incomeType", skip_serializing_if = "Option::is_none")] pub income_type: Option, #[serde(rename = "income", skip_serializing_if = "Option::is_none")] pub income: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, } impl GetUmIncomeHistoryResponseInner { #[must_use] pub fn new() -> GetUmIncomeHistoryResponseInner { GetUmIncomeHistoryResponseInner { symbol: None, income_type: None, income: None, asset: None, info: None, time: None, tran_id: None, trade_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_user_commission_rate_for_cm_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUserCommissionRateForCmResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde( rename = "makerCommissionRate", skip_serializing_if = "Option::is_none" )] pub maker_commission_rate: Option, #[serde( rename = "takerCommissionRate", skip_serializing_if = "Option::is_none" )] pub taker_commission_rate: Option, } impl GetUserCommissionRateForCmResponse { #[must_use] pub fn new() -> GetUserCommissionRateForCmResponse { GetUserCommissionRateForCmResponse { symbol: None, maker_commission_rate: None, taker_commission_rate: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/get_user_commission_rate_for_um_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUserCommissionRateForUmResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde( rename = "makerCommissionRate", skip_serializing_if = "Option::is_none" )] pub maker_commission_rate: Option, #[serde( rename = "takerCommissionRate", skip_serializing_if = "Option::is_none" )] pub taker_commission_rate: Option, } impl GetUserCommissionRateForUmResponse { #[must_use] pub fn new() -> GetUserCommissionRateForUmResponse { GetUserCommissionRateForUmResponse { symbol: None, maker_commission_rate: None, taker_commission_rate: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/margin_account_borrow_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountBorrowResponse { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl MarginAccountBorrowResponse { #[must_use] pub fn new() -> MarginAccountBorrowResponse { MarginAccountBorrowResponse { tran_id: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/margin_account_new_oco_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOcoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde( rename = "marginBuyBorrowAmount", skip_serializing_if = "Option::is_none" )] pub margin_buy_borrow_amount: Option, #[serde( rename = "marginBuyBorrowAsset", skip_serializing_if = "Option::is_none" )] pub margin_buy_borrow_asset: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl MarginAccountNewOcoResponse { #[must_use] pub fn new() -> MarginAccountNewOcoResponse { MarginAccountNewOcoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, margin_buy_borrow_amount: None, margin_buy_borrow_asset: None, orders: None, order_reports: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/margin_account_new_oco_response_order_reports_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOcoResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, } impl MarginAccountNewOcoResponseOrderReportsInner { #[must_use] pub fn new() -> MarginAccountNewOcoResponseOrderReportsInner { MarginAccountNewOcoResponseOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/margin_account_new_oco_response_orders_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOcoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl MarginAccountNewOcoResponseOrdersInner { #[must_use] pub fn new() -> MarginAccountNewOcoResponseOrdersInner { MarginAccountNewOcoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/margin_account_repay_debt_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountRepayDebtResponse { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "specifyRepayAssets", skip_serializing_if = "Option::is_none")] pub specify_repay_assets: Option>, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl MarginAccountRepayDebtResponse { #[must_use] pub fn new() -> MarginAccountRepayDebtResponse { MarginAccountRepayDebtResponse { amount: None, asset: None, specify_repay_assets: None, update_time: None, success: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/margin_account_repay_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountRepayResponse { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl MarginAccountRepayResponse { #[must_use] pub fn new() -> MarginAccountRepayResponse { MarginAccountRepayResponse { tran_id: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/margin_account_trade_list_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountTradeListResponseInner { #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "isBestMatch", skip_serializing_if = "Option::is_none")] pub is_best_match: Option, #[serde(rename = "isBuyer", skip_serializing_if = "Option::is_none")] pub is_buyer: Option, #[serde(rename = "isMaker", skip_serializing_if = "Option::is_none")] pub is_maker: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl MarginAccountTradeListResponseInner { #[must_use] pub fn new() -> MarginAccountTradeListResponseInner { MarginAccountTradeListResponseInner { commission: None, commission_asset: None, id: None, is_best_match: None, is_buyer: None, is_maker: None, order_id: None, price: None, qty: None, symbol: None, time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/margin_max_borrow_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginMaxBorrowResponse { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "borrowLimit", skip_serializing_if = "Option::is_none")] pub borrow_limit: Option, } impl MarginMaxBorrowResponse { #[must_use] pub fn new() -> MarginMaxBorrowResponse { MarginMaxBorrowResponse { amount: None, borrow_limit: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/modify_cm_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ModifyCmOrderResponse { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "cumQty", skip_serializing_if = "Option::is_none")] pub cum_qty: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl ModifyCmOrderResponse { #[must_use] pub fn new() -> ModifyCmOrderResponse { ModifyCmOrderResponse { order_id: None, symbol: None, pair: None, status: None, client_order_id: None, price: None, avg_price: None, orig_qty: None, executed_qty: None, cum_qty: None, cum_base: None, time_in_force: None, r#type: None, reduce_only: None, side: None, position_side: None, orig_type: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/modify_um_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ModifyUmOrderResponse { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "cumQty", skip_serializing_if = "Option::is_none")] pub cum_qty: Option, #[serde(rename = "cumQuote", skip_serializing_if = "Option::is_none")] pub cum_quote: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "goodTillDate", skip_serializing_if = "Option::is_none")] pub good_till_date: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl ModifyUmOrderResponse { #[must_use] pub fn new() -> ModifyUmOrderResponse { ModifyUmOrderResponse { order_id: None, symbol: None, status: None, client_order_id: None, price: None, avg_price: None, orig_qty: None, executed_qty: None, cum_qty: None, cum_quote: None, time_in_force: None, r#type: None, reduce_only: None, side: None, position_side: None, orig_type: None, self_trade_prevention_mode: None, good_till_date: None, update_time: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/new_cm_conditional_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewCmConditionalOrderResponse { #[serde( rename = "newClientStrategyId", skip_serializing_if = "Option::is_none" )] pub new_client_strategy_id: Option, #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] pub strategy_id: Option, #[serde(rename = "strategyStatus", skip_serializing_if = "Option::is_none")] pub strategy_status: Option, #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] pub strategy_type: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "activatePrice", skip_serializing_if = "Option::is_none")] pub activate_price: Option, #[serde(rename = "priceRate", skip_serializing_if = "Option::is_none")] pub price_rate: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "workingType", skip_serializing_if = "Option::is_none")] pub working_type: Option, #[serde(rename = "priceProtect", skip_serializing_if = "Option::is_none")] pub price_protect: Option, } impl NewCmConditionalOrderResponse { #[must_use] pub fn new() -> NewCmConditionalOrderResponse { NewCmConditionalOrderResponse { new_client_strategy_id: None, strategy_id: None, strategy_status: None, strategy_type: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, stop_price: None, symbol: None, pair: None, time_in_force: None, activate_price: None, price_rate: None, book_time: None, update_time: None, working_type: None, price_protect: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/new_cm_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewCmOrderResponse { #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "cumQty", skip_serializing_if = "Option::is_none")] pub cum_qty: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl NewCmOrderResponse { #[must_use] pub fn new() -> NewCmOrderResponse { NewCmOrderResponse { client_order_id: None, cum_qty: None, cum_base: None, executed_qty: None, order_id: None, avg_price: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, status: None, symbol: None, pair: None, time_in_force: None, r#type: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/new_margin_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewMarginOrderResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde( rename = "marginBuyBorrowAmount", skip_serializing_if = "Option::is_none" )] pub margin_buy_borrow_amount: Option, #[serde( rename = "marginBuyBorrowAsset", skip_serializing_if = "Option::is_none" )] pub margin_buy_borrow_asset: Option, #[serde(rename = "fills", skip_serializing_if = "Option::is_none")] pub fills: Option>, } impl NewMarginOrderResponse { #[must_use] pub fn new() -> NewMarginOrderResponse { NewMarginOrderResponse { symbol: None, order_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, margin_buy_borrow_amount: None, margin_buy_borrow_asset: None, fills: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/new_margin_order_response_fills_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewMarginOrderResponseFillsInner { #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, } impl NewMarginOrderResponseFillsInner { #[must_use] pub fn new() -> NewMarginOrderResponseFillsInner { NewMarginOrderResponseFillsInner { price: None, qty: None, commission: None, commission_asset: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/new_um_conditional_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewUmConditionalOrderResponse { #[serde( rename = "newClientStrategyId", skip_serializing_if = "Option::is_none" )] pub new_client_strategy_id: Option, #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] pub strategy_id: Option, #[serde(rename = "strategyStatus", skip_serializing_if = "Option::is_none")] pub strategy_status: Option, #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] pub strategy_type: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "activatePrice", skip_serializing_if = "Option::is_none")] pub activate_price: Option, #[serde(rename = "priceRate", skip_serializing_if = "Option::is_none")] pub price_rate: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "workingType", skip_serializing_if = "Option::is_none")] pub working_type: Option, #[serde(rename = "priceProtect", skip_serializing_if = "Option::is_none")] pub price_protect: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "goodTillDate", skip_serializing_if = "Option::is_none")] pub good_till_date: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl NewUmConditionalOrderResponse { #[must_use] pub fn new() -> NewUmConditionalOrderResponse { NewUmConditionalOrderResponse { new_client_strategy_id: None, strategy_id: None, strategy_status: None, strategy_type: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, stop_price: None, symbol: None, time_in_force: None, activate_price: None, price_rate: None, book_time: None, update_time: None, working_type: None, price_protect: None, self_trade_prevention_mode: None, good_till_date: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/new_um_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewUmOrderResponse { #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "cumQty", skip_serializing_if = "Option::is_none")] pub cum_qty: Option, #[serde(rename = "cumQuote", skip_serializing_if = "Option::is_none")] pub cum_quote: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "goodTillDate", skip_serializing_if = "Option::is_none")] pub good_till_date: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl NewUmOrderResponse { #[must_use] pub fn new() -> NewUmOrderResponse { NewUmOrderResponse { client_order_id: None, cum_qty: None, cum_quote: None, executed_qty: None, order_id: None, avg_price: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, status: None, symbol: None, time_in_force: None, r#type: None, self_trade_prevention_mode: None, good_till_date: None, update_time: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/portfolio_margin_um_trading_quantitative_rules_indicators_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse { #[serde(rename = "indicators", skip_serializing_if = "Option::is_none")] pub indicators: Option>, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse { #[must_use] pub fn new() -> PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse { PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponse { indicators: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/portfolio_margin_um_trading_quantitative_rules_indicators_response_indicators.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators { #[serde(rename = "BTCUSDT", skip_serializing_if = "Option::is_none")] pub btcusdt: Option>, #[serde(rename = "ACCOUNT", skip_serializing_if = "Option::is_none")] pub account: Option>, } impl PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators { #[must_use] pub fn new() -> PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators { PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicators { btcusdt: None, account: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/portfolio_margin_um_trading_quantitative_rules_indicators_response_indicators_account_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsAccountInner { #[serde(rename = "indicator", skip_serializing_if = "Option::is_none")] pub indicator: Option, #[serde(rename = "value", skip_serializing_if = "Option::is_none")] pub value: Option, #[serde(rename = "triggerValue", skip_serializing_if = "Option::is_none")] pub trigger_value: Option, #[serde(rename = "plannedRecoverTime", skip_serializing_if = "Option::is_none")] pub planned_recover_time: Option, #[serde(rename = "isLocked", skip_serializing_if = "Option::is_none")] pub is_locked: Option, } impl PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsAccountInner { #[must_use] pub fn new() -> PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsAccountInner { PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsAccountInner { indicator: None, value: None, trigger_value: None, planned_recover_time: None, is_locked: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/portfolio_margin_um_trading_quantitative_rules_indicators_response_indicators_btcusdt_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBtcusdtInner { #[serde(rename = "isLocked", skip_serializing_if = "Option::is_none")] pub is_locked: Option, #[serde(rename = "plannedRecoverTime", skip_serializing_if = "Option::is_none")] pub planned_recover_time: Option, #[serde(rename = "indicator", skip_serializing_if = "Option::is_none")] pub indicator: Option, #[serde(rename = "value", skip_serializing_if = "Option::is_none")] pub value: Option, #[serde(rename = "triggerValue", skip_serializing_if = "Option::is_none")] pub trigger_value: Option, } impl PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBtcusdtInner { #[must_use] pub fn new() -> PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBtcusdtInner { PortfolioMarginUmTradingQuantitativeRulesIndicatorsResponseIndicatorsBtcusdtInner { is_locked: None, planned_recover_time: None, indicator: None, value: None, trigger_value: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_all_cm_conditional_orders_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryAllCmConditionalOrdersResponseInner { #[serde( rename = "newClientStrategyId", skip_serializing_if = "Option::is_none" )] pub new_client_strategy_id: Option, #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] pub strategy_id: Option, #[serde(rename = "strategyStatus", skip_serializing_if = "Option::is_none")] pub strategy_status: Option, #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] pub strategy_type: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "triggerTime", skip_serializing_if = "Option::is_none")] pub trigger_time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "activatePrice", skip_serializing_if = "Option::is_none")] pub activate_price: Option, #[serde(rename = "priceRate", skip_serializing_if = "Option::is_none")] pub price_rate: Option, } impl QueryAllCmConditionalOrdersResponseInner { #[must_use] pub fn new() -> QueryAllCmConditionalOrdersResponseInner { QueryAllCmConditionalOrdersResponseInner { new_client_strategy_id: None, strategy_id: None, strategy_status: None, strategy_type: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, stop_price: None, symbol: None, order_id: None, status: None, book_time: None, update_time: None, trigger_time: None, time_in_force: None, r#type: None, activate_price: None, price_rate: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_all_cm_orders_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryAllCmOrdersResponseInner { #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryAllCmOrdersResponseInner { #[must_use] pub fn new() -> QueryAllCmOrdersResponseInner { QueryAllCmOrdersResponseInner { avg_price: None, client_order_id: None, cum_base: None, executed_qty: None, order_id: None, orig_qty: None, orig_type: None, price: None, reduce_only: None, side: None, position_side: None, status: None, symbol: None, pair: None, time: None, time_in_force: None, r#type: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_all_current_cm_open_conditional_orders_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryAllCurrentCmOpenConditionalOrdersResponseInner { #[serde( rename = "newClientStrategyId", skip_serializing_if = "Option::is_none" )] pub new_client_strategy_id: Option, #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] pub strategy_id: Option, #[serde(rename = "strategyStatus", skip_serializing_if = "Option::is_none")] pub strategy_status: Option, #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] pub strategy_type: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "activatePrice", skip_serializing_if = "Option::is_none")] pub activate_price: Option, #[serde(rename = "priceRate", skip_serializing_if = "Option::is_none")] pub price_rate: Option, } impl QueryAllCurrentCmOpenConditionalOrdersResponseInner { #[must_use] pub fn new() -> QueryAllCurrentCmOpenConditionalOrdersResponseInner { QueryAllCurrentCmOpenConditionalOrdersResponseInner { new_client_strategy_id: None, strategy_id: None, strategy_status: None, strategy_type: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, stop_price: None, symbol: None, book_time: None, update_time: None, time_in_force: None, activate_price: None, price_rate: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_all_current_um_open_conditional_orders_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryAllCurrentUmOpenConditionalOrdersResponseInner { #[serde( rename = "newClientStrategyId", skip_serializing_if = "Option::is_none" )] pub new_client_strategy_id: Option, #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] pub strategy_id: Option, #[serde(rename = "strategyStatus", skip_serializing_if = "Option::is_none")] pub strategy_status: Option, #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] pub strategy_type: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "activatePrice", skip_serializing_if = "Option::is_none")] pub activate_price: Option, #[serde(rename = "priceRate", skip_serializing_if = "Option::is_none")] pub price_rate: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "goodTillDate", skip_serializing_if = "Option::is_none")] pub good_till_date: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl QueryAllCurrentUmOpenConditionalOrdersResponseInner { #[must_use] pub fn new() -> QueryAllCurrentUmOpenConditionalOrdersResponseInner { QueryAllCurrentUmOpenConditionalOrdersResponseInner { new_client_strategy_id: None, strategy_id: None, strategy_status: None, strategy_type: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, stop_price: None, symbol: None, book_time: None, update_time: None, time_in_force: None, activate_price: None, price_rate: None, self_trade_prevention_mode: None, good_till_date: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_all_current_um_open_orders_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryAllCurrentUmOpenOrdersResponseInner { #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "cumQuote", skip_serializing_if = "Option::is_none")] pub cum_quote: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "goodTillDate", skip_serializing_if = "Option::is_none")] pub good_till_date: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl QueryAllCurrentUmOpenOrdersResponseInner { #[must_use] pub fn new() -> QueryAllCurrentUmOpenOrdersResponseInner { QueryAllCurrentUmOpenOrdersResponseInner { avg_price: None, client_order_id: None, cum_quote: None, executed_qty: None, order_id: None, orig_qty: None, orig_type: None, price: None, reduce_only: None, side: None, position_side: None, status: None, symbol: None, time: None, time_in_force: None, r#type: None, update_time: None, self_trade_prevention_mode: None, good_till_date: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_all_margin_account_orders_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryAllMarginAccountOrdersResponseInner { #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, #[serde(rename = "isWorking", skip_serializing_if = "Option::is_none")] pub is_working: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")] pub account_id: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "preventedMatchId", skip_serializing_if = "Option::is_none")] pub prevented_match_id: Option, #[serde(rename = "preventedQuantity", skip_serializing_if = "Option::is_none")] pub prevented_quantity: Option, } impl QueryAllMarginAccountOrdersResponseInner { #[must_use] pub fn new() -> QueryAllMarginAccountOrdersResponseInner { QueryAllMarginAccountOrdersResponseInner { client_order_id: None, cummulative_quote_qty: None, executed_qty: None, iceberg_qty: None, is_working: None, order_id: None, orig_qty: None, price: None, side: None, status: None, stop_price: None, symbol: None, time: None, time_in_force: None, r#type: None, update_time: None, account_id: None, self_trade_prevention_mode: None, prevented_match_id: None, prevented_quantity: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_cm_modify_order_history_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCmModifyOrderHistoryResponseInner { #[serde(rename = "amendmentId", skip_serializing_if = "Option::is_none")] pub amendment_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "amendment", skip_serializing_if = "Option::is_none")] pub amendment: Option>, } impl QueryCmModifyOrderHistoryResponseInner { #[must_use] pub fn new() -> QueryCmModifyOrderHistoryResponseInner { QueryCmModifyOrderHistoryResponseInner { amendment_id: None, symbol: None, pair: None, order_id: None, client_order_id: None, time: None, amendment: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_cm_modify_order_history_response_inner_amendment.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCmModifyOrderHistoryResponseInnerAmendment { #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option>, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option>, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl QueryCmModifyOrderHistoryResponseInnerAmendment { #[must_use] pub fn new() -> QueryCmModifyOrderHistoryResponseInnerAmendment { QueryCmModifyOrderHistoryResponseInnerAmendment { price: None, orig_qty: None, count: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_cm_modify_order_history_response_inner_amendment_orig_qty.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty { #[serde(rename = "before", skip_serializing_if = "Option::is_none")] pub before: Option, #[serde(rename = "after", skip_serializing_if = "Option::is_none")] pub after: Option, } impl QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty { #[must_use] pub fn new() -> QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty { QueryCmModifyOrderHistoryResponseInnerAmendmentOrigQty { before: None, after: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_cm_modify_order_history_response_inner_amendment_price.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCmModifyOrderHistoryResponseInnerAmendmentPrice { #[serde(rename = "before", skip_serializing_if = "Option::is_none")] pub before: Option, #[serde(rename = "after", skip_serializing_if = "Option::is_none")] pub after: Option, } impl QueryCmModifyOrderHistoryResponseInnerAmendmentPrice { #[must_use] pub fn new() -> QueryCmModifyOrderHistoryResponseInnerAmendmentPrice { QueryCmModifyOrderHistoryResponseInnerAmendmentPrice { before: None, after: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_cm_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCmOrderResponse { #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryCmOrderResponse { #[must_use] pub fn new() -> QueryCmOrderResponse { QueryCmOrderResponse { avg_price: None, client_order_id: None, cum_base: None, executed_qty: None, order_id: None, orig_qty: None, orig_type: None, price: None, reduce_only: None, side: None, status: None, symbol: None, pair: None, position_side: None, time: None, time_in_force: None, r#type: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_cm_position_information_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCmPositionInformationResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "unRealizedProfit", skip_serializing_if = "Option::is_none")] pub un_realized_profit: Option, #[serde(rename = "liquidationPrice", skip_serializing_if = "Option::is_none")] pub liquidation_price: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "notionalValue", skip_serializing_if = "Option::is_none")] pub notional_value: Option, } impl QueryCmPositionInformationResponseInner { #[must_use] pub fn new() -> QueryCmPositionInformationResponseInner { QueryCmPositionInformationResponseInner { symbol: None, position_amt: None, entry_price: None, mark_price: None, un_realized_profit: None, liquidation_price: None, leverage: None, position_side: None, update_time: None, max_qty: None, notional_value: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_current_cm_open_conditional_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentCmOpenConditionalOrderResponse { #[serde( rename = "newClientStrategyId", skip_serializing_if = "Option::is_none" )] pub new_client_strategy_id: Option, #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] pub strategy_id: Option, #[serde(rename = "strategyStatus", skip_serializing_if = "Option::is_none")] pub strategy_status: Option, #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] pub strategy_type: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "activatePrice", skip_serializing_if = "Option::is_none")] pub activate_price: Option, #[serde(rename = "priceRate", skip_serializing_if = "Option::is_none")] pub price_rate: Option, } impl QueryCurrentCmOpenConditionalOrderResponse { #[must_use] pub fn new() -> QueryCurrentCmOpenConditionalOrderResponse { QueryCurrentCmOpenConditionalOrderResponse { new_client_strategy_id: None, strategy_id: None, strategy_status: None, strategy_type: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, stop_price: None, symbol: None, book_time: None, update_time: None, time_in_force: None, activate_price: None, price_rate: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_current_cm_open_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentCmOpenOrderResponse { #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryCurrentCmOpenOrderResponse { #[must_use] pub fn new() -> QueryCurrentCmOpenOrderResponse { QueryCurrentCmOpenOrderResponse { avg_price: None, client_order_id: None, cum_base: None, executed_qty: None, order_id: None, orig_qty: None, orig_type: None, price: None, reduce_only: None, side: None, position_side: None, status: None, symbol: None, pair: None, time: None, time_in_force: None, r#type: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_current_margin_open_order_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentMarginOpenOrderResponseInner { #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, #[serde(rename = "isWorking", skip_serializing_if = "Option::is_none")] pub is_working: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")] pub account_id: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "preventedMatchId", skip_serializing_if = "Option::is_none")] pub prevented_match_id: Option, #[serde(rename = "preventedQuantity", skip_serializing_if = "Option::is_none")] pub prevented_quantity: Option, } impl QueryCurrentMarginOpenOrderResponseInner { #[must_use] pub fn new() -> QueryCurrentMarginOpenOrderResponseInner { QueryCurrentMarginOpenOrderResponseInner { client_order_id: None, cummulative_quote_qty: None, executed_qty: None, iceberg_qty: None, is_working: None, order_id: None, orig_qty: None, price: None, side: None, status: None, stop_price: None, symbol: None, time: None, time_in_force: None, r#type: None, update_time: None, account_id: None, self_trade_prevention_mode: None, prevented_match_id: None, prevented_quantity: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_current_um_open_conditional_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentUmOpenConditionalOrderResponse { #[serde( rename = "newClientStrategyId", skip_serializing_if = "Option::is_none" )] pub new_client_strategy_id: Option, #[serde(rename = "strategyId", skip_serializing_if = "Option::is_none")] pub strategy_id: Option, #[serde(rename = "strategyStatus", skip_serializing_if = "Option::is_none")] pub strategy_status: Option, #[serde(rename = "strategyType", skip_serializing_if = "Option::is_none")] pub strategy_type: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bookTime", skip_serializing_if = "Option::is_none")] pub book_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "activatePrice", skip_serializing_if = "Option::is_none")] pub activate_price: Option, #[serde(rename = "priceRate", skip_serializing_if = "Option::is_none")] pub price_rate: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "goodTillDate", skip_serializing_if = "Option::is_none")] pub good_till_date: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl QueryCurrentUmOpenConditionalOrderResponse { #[must_use] pub fn new() -> QueryCurrentUmOpenConditionalOrderResponse { QueryCurrentUmOpenConditionalOrderResponse { new_client_strategy_id: None, strategy_id: None, strategy_status: None, strategy_type: None, orig_qty: None, price: None, reduce_only: None, side: None, position_side: None, stop_price: None, symbol: None, book_time: None, update_time: None, time_in_force: None, activate_price: None, price_rate: None, self_trade_prevention_mode: None, good_till_date: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_current_um_open_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentUmOpenOrderResponse { #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "cumQuote", skip_serializing_if = "Option::is_none")] pub cum_quote: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "goodTillDate", skip_serializing_if = "Option::is_none")] pub good_till_date: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl QueryCurrentUmOpenOrderResponse { #[must_use] pub fn new() -> QueryCurrentUmOpenOrderResponse { QueryCurrentUmOpenOrderResponse { avg_price: None, client_order_id: None, cum_quote: None, executed_qty: None, order_id: None, orig_qty: None, orig_type: None, price: None, reduce_only: None, side: None, position_side: None, status: None, symbol: None, time: None, time_in_force: None, r#type: None, update_time: None, self_trade_prevention_mode: None, good_till_date: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_account_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountOrderResponse { #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, #[serde(rename = "isWorking", skip_serializing_if = "Option::is_none")] pub is_working: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")] pub account_id: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "preventedMatchId", skip_serializing_if = "Option::is_none")] pub prevented_match_id: Option, #[serde(rename = "preventedQuantity", skip_serializing_if = "Option::is_none")] pub prevented_quantity: Option, } impl QueryMarginAccountOrderResponse { #[must_use] pub fn new() -> QueryMarginAccountOrderResponse { QueryMarginAccountOrderResponse { client_order_id: None, cummulative_quote_qty: None, executed_qty: None, iceberg_qty: None, is_working: None, order_id: None, orig_qty: None, price: None, side: None, status: None, stop_price: None, symbol: None, time: None, time_in_force: None, r#type: None, update_time: None, account_id: None, self_trade_prevention_mode: None, prevented_match_id: None, prevented_quantity: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_all_oco_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsAllOcoResponseInner { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl QueryMarginAccountsAllOcoResponseInner { #[must_use] pub fn new() -> QueryMarginAccountsAllOcoResponseInner { QueryMarginAccountsAllOcoResponseInner { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_all_oco_response_inner_orders_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsAllOcoResponseInnerOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl QueryMarginAccountsAllOcoResponseInnerOrdersInner { #[must_use] pub fn new() -> QueryMarginAccountsAllOcoResponseInnerOrdersInner { QueryMarginAccountsAllOcoResponseInnerOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_oco_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsOcoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl QueryMarginAccountsOcoResponse { #[must_use] pub fn new() -> QueryMarginAccountsOcoResponse { QueryMarginAccountsOcoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_oco_response_orders_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsOcoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl QueryMarginAccountsOcoResponseOrdersInner { #[must_use] pub fn new() -> QueryMarginAccountsOcoResponseOrdersInner { QueryMarginAccountsOcoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_open_oco_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsOpenOcoResponseInner { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl QueryMarginAccountsOpenOcoResponseInner { #[must_use] pub fn new() -> QueryMarginAccountsOpenOcoResponseInner { QueryMarginAccountsOpenOcoResponseInner { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_open_oco_response_inner_orders_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsOpenOcoResponseInnerOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl QueryMarginAccountsOpenOcoResponseInnerOrdersInner { #[must_use] pub fn new() -> QueryMarginAccountsOpenOcoResponseInnerOrdersInner { QueryMarginAccountsOpenOcoResponseInnerOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_loan_record_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginLoanRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl QueryMarginLoanRecordResponse { #[must_use] pub fn new() -> QueryMarginLoanRecordResponse { QueryMarginLoanRecordResponse { rows: None, total: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_loan_record_response_rows_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginLoanRecordResponseRowsInner { #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "principal", skip_serializing_if = "Option::is_none")] pub principal: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl QueryMarginLoanRecordResponseRowsInner { #[must_use] pub fn new() -> QueryMarginLoanRecordResponseRowsInner { QueryMarginLoanRecordResponseRowsInner { tx_id: None, asset: None, principal: None, timestamp: None, status: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_max_withdraw_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginMaxWithdrawResponse { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, } impl QueryMarginMaxWithdrawResponse { #[must_use] pub fn new() -> QueryMarginMaxWithdrawResponse { QueryMarginMaxWithdrawResponse { amount: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_repay_record_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginRepayRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl QueryMarginRepayRecordResponse { #[must_use] pub fn new() -> QueryMarginRepayRecordResponse { QueryMarginRepayRecordResponse { rows: None, total: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_margin_repay_record_response_rows_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginRepayRecordResponseRowsInner { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "principal", skip_serializing_if = "Option::is_none")] pub principal: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, } impl QueryMarginRepayRecordResponseRowsInner { #[must_use] pub fn new() -> QueryMarginRepayRecordResponseRowsInner { QueryMarginRepayRecordResponseRowsInner { amount: None, asset: None, interest: None, principal: None, status: None, timestamp: None, tx_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_portfolio_margin_negative_balance_interest_history_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde( rename = "interestAccuredTime", skip_serializing_if = "Option::is_none" )] pub interest_accured_time: Option, #[serde(rename = "interestRate", skip_serializing_if = "Option::is_none")] pub interest_rate: Option, #[serde(rename = "principal", skip_serializing_if = "Option::is_none")] pub principal: Option, } impl QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner { #[must_use] pub fn new() -> QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner { QueryPortfolioMarginNegativeBalanceInterestHistoryResponseInner { asset: None, interest: None, interest_accured_time: None, interest_rate: None, principal: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_um_modify_order_history_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUmModifyOrderHistoryResponseInner { #[serde(rename = "amendmentId", skip_serializing_if = "Option::is_none")] pub amendment_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "amendment", skip_serializing_if = "Option::is_none")] pub amendment: Option>, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl QueryUmModifyOrderHistoryResponseInner { #[must_use] pub fn new() -> QueryUmModifyOrderHistoryResponseInner { QueryUmModifyOrderHistoryResponseInner { amendment_id: None, symbol: None, pair: None, order_id: None, client_order_id: None, time: None, amendment: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_um_order_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUmOrderResponse { #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "cumQuote", skip_serializing_if = "Option::is_none")] pub cum_quote: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "goodTillDate", skip_serializing_if = "Option::is_none")] pub good_till_date: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, } impl QueryUmOrderResponse { #[must_use] pub fn new() -> QueryUmOrderResponse { QueryUmOrderResponse { avg_price: None, client_order_id: None, cum_quote: None, executed_qty: None, order_id: None, orig_qty: None, orig_type: None, price: None, reduce_only: None, side: None, position_side: None, status: None, symbol: None, time: None, time_in_force: None, r#type: None, update_time: None, self_trade_prevention_mode: None, good_till_date: None, price_match: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_um_position_information_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUmPositionInformationResponseInner { #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "maxNotionalValue", skip_serializing_if = "Option::is_none")] pub max_notional_value: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "notional", skip_serializing_if = "Option::is_none")] pub notional: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "unRealizedProfit", skip_serializing_if = "Option::is_none")] pub un_realized_profit: Option, #[serde(rename = "liquidationPrice", skip_serializing_if = "Option::is_none")] pub liquidation_price: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryUmPositionInformationResponseInner { #[must_use] pub fn new() -> QueryUmPositionInformationResponseInner { QueryUmPositionInformationResponseInner { entry_price: None, leverage: None, mark_price: None, max_notional_value: None, position_amt: None, notional: None, symbol: None, un_realized_profit: None, liquidation_price: None, position_side: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_user_negative_balance_auto_exchange_record_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUserNegativeBalanceAutoExchangeRecordResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, } impl QueryUserNegativeBalanceAutoExchangeRecordResponse { #[must_use] pub fn new() -> QueryUserNegativeBalanceAutoExchangeRecordResponse { QueryUserNegativeBalanceAutoExchangeRecordResponse { total: None, rows: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_user_negative_balance_auto_exchange_record_response_rows_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner { #[serde(rename = "startTime", skip_serializing_if = "Option::is_none")] pub start_time: Option, #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")] pub end_time: Option, #[serde(rename = "details", skip_serializing_if = "Option::is_none")] pub details: Option< Vec, >, } impl QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner { #[must_use] pub fn new() -> QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner { QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInner { start_time: None, end_time: None, details: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_user_negative_balance_auto_exchange_record_response_rows_inner_details_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "negativeBalance", skip_serializing_if = "Option::is_none")] pub negative_balance: Option, #[serde( rename = "negativeMaxThreshold", skip_serializing_if = "Option::is_none" )] pub negative_max_threshold: Option, } impl QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner { #[must_use] pub fn new() -> QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner { QueryUserNegativeBalanceAutoExchangeRecordResponseRowsInnerDetailsInner { asset: None, negative_balance: None, negative_max_threshold: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_user_rate_limit_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUserRateLimitResponseInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, } impl QueryUserRateLimitResponseInner { #[must_use] pub fn new() -> QueryUserRateLimitResponseInner { QueryUserRateLimitResponseInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_users_cm_force_orders_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUsersCmForceOrdersResponseInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "cumBase", skip_serializing_if = "Option::is_none")] pub cum_base: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryUsersCmForceOrdersResponseInner { #[must_use] pub fn new() -> QueryUsersCmForceOrdersResponseInner { QueryUsersCmForceOrdersResponseInner { order_id: None, symbol: None, pair: None, status: None, client_order_id: None, price: None, avg_price: None, orig_qty: None, executed_qty: None, cum_base: None, time_in_force: None, r#type: None, reduce_only: None, side: None, position_side: None, orig_type: None, time: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_users_margin_force_orders_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUsersMarginForceOrdersResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl QueryUsersMarginForceOrdersResponse { #[must_use] pub fn new() -> QueryUsersMarginForceOrdersResponse { QueryUsersMarginForceOrdersResponse { rows: None, total: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_users_margin_force_orders_response_rows_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUsersMarginForceOrdersResponseRowsInner { #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "updatedTime", skip_serializing_if = "Option::is_none")] pub updated_time: Option, } impl QueryUsersMarginForceOrdersResponseRowsInner { #[must_use] pub fn new() -> QueryUsersMarginForceOrdersResponseRowsInner { QueryUsersMarginForceOrdersResponseRowsInner { avg_price: None, executed_qty: None, order_id: None, price: None, qty: None, side: None, symbol: None, time_in_force: None, updated_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/query_users_um_force_orders_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUsersUmForceOrdersResponseInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "cumQuote", skip_serializing_if = "Option::is_none")] pub cum_quote: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryUsersUmForceOrdersResponseInner { #[must_use] pub fn new() -> QueryUsersUmForceOrdersResponseInner { QueryUsersUmForceOrdersResponseInner { order_id: None, symbol: None, status: None, client_order_id: None, price: None, avg_price: None, orig_qty: None, executed_qty: None, cum_quote: None, time_in_force: None, r#type: None, reduce_only: None, side: None, position_side: None, orig_type: None, time: None, update_time: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/repay_futures_negative_balance_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RepayFuturesNegativeBalanceResponse { #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl RepayFuturesNegativeBalanceResponse { #[must_use] pub fn new() -> RepayFuturesNegativeBalanceResponse { RepayFuturesNegativeBalanceResponse { msg: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/start_user_data_stream_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StartUserDataStreamResponse { #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl StartUserDataStreamResponse { #[must_use] pub fn new() -> StartUserDataStreamResponse { StartUserDataStreamResponse { listen_key: None } } } src/derivatives_trading_portfolio_margin/rest_api/models/toggle_bnb_burn_on_um_futures_trade_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ToggleBnbBurnOnUmFuturesTradeResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ToggleBnbBurnOnUmFuturesTradeResponse { #[must_use] pub fn new() -> ToggleBnbBurnOnUmFuturesTradeResponse { ToggleBnbBurnOnUmFuturesTradeResponse { code: None, msg: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/um_account_trade_list_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UmAccountTradeListResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "realizedPnl", skip_serializing_if = "Option::is_none")] pub realized_pnl: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, } impl UmAccountTradeListResponseInner { #[must_use] pub fn new() -> UmAccountTradeListResponseInner { UmAccountTradeListResponseInner { symbol: None, id: None, order_id: None, side: None, price: None, qty: None, realized_pnl: None, quote_qty: None, commission: None, commission_asset: None, time: None, buyer: None, maker: None, position_side: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/um_futures_account_configuration_response.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UmFuturesAccountConfigurationResponse { #[serde(rename = "feeTier", skip_serializing_if = "Option::is_none")] pub fee_tier: Option, #[serde(rename = "canTrade", skip_serializing_if = "Option::is_none")] pub can_trade: Option, #[serde(rename = "canDeposit", skip_serializing_if = "Option::is_none")] pub can_deposit: Option, #[serde(rename = "canWithdraw", skip_serializing_if = "Option::is_none")] pub can_withdraw: Option, #[serde(rename = "dualSidePosition", skip_serializing_if = "Option::is_none")] pub dual_side_position: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "multiAssetsMargin", skip_serializing_if = "Option::is_none")] pub multi_assets_margin: Option, #[serde(rename = "tradeGroupId", skip_serializing_if = "Option::is_none")] pub trade_group_id: Option, } impl UmFuturesAccountConfigurationResponse { #[must_use] pub fn new() -> UmFuturesAccountConfigurationResponse { UmFuturesAccountConfigurationResponse { fee_tier: None, can_trade: None, can_deposit: None, can_withdraw: None, dual_side_position: None, update_time: None, multi_assets_margin: None, trade_group_id: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/um_futures_symbol_configuration_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UmFuturesSymbolConfigurationResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "marginType", skip_serializing_if = "Option::is_none")] pub margin_type: Option, #[serde(rename = "isAutoAddMargin", skip_serializing_if = "Option::is_none")] pub is_auto_add_margin: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "maxNotionalValue", skip_serializing_if = "Option::is_none")] pub max_notional_value: Option, } impl UmFuturesSymbolConfigurationResponseInner { #[must_use] pub fn new() -> UmFuturesSymbolConfigurationResponseInner { UmFuturesSymbolConfigurationResponseInner { symbol: None, margin_type: None, is_auto_add_margin: None, leverage: None, max_notional_value: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/um_notional_and_leverage_brackets_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UmNotionalAndLeverageBracketsResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "notionalCoef", skip_serializing_if = "Option::is_none")] pub notional_coef: Option, #[serde(rename = "brackets", skip_serializing_if = "Option::is_none")] pub brackets: Option>, } impl UmNotionalAndLeverageBracketsResponseInner { #[must_use] pub fn new() -> UmNotionalAndLeverageBracketsResponseInner { UmNotionalAndLeverageBracketsResponseInner { symbol: None, notional_coef: None, brackets: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/um_notional_and_leverage_brackets_response_inner_brackets_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UmNotionalAndLeverageBracketsResponseInnerBracketsInner { #[serde(rename = "bracket", skip_serializing_if = "Option::is_none")] pub bracket: Option, #[serde(rename = "initialLeverage", skip_serializing_if = "Option::is_none")] pub initial_leverage: Option, #[serde(rename = "notionalCap", skip_serializing_if = "Option::is_none")] pub notional_cap: Option, #[serde(rename = "notionalFloor", skip_serializing_if = "Option::is_none")] pub notional_floor: Option, #[serde(rename = "maintMarginRatio", skip_serializing_if = "Option::is_none")] pub maint_margin_ratio: Option, #[serde(rename = "cum", skip_serializing_if = "Option::is_none")] pub cum: Option, } impl UmNotionalAndLeverageBracketsResponseInnerBracketsInner { #[must_use] pub fn new() -> UmNotionalAndLeverageBracketsResponseInnerBracketsInner { UmNotionalAndLeverageBracketsResponseInnerBracketsInner { bracket: None, initial_leverage: None, notional_cap: None, notional_floor: None, maint_margin_ratio: None, cum: None, } } } src/derivatives_trading_portfolio_margin/rest_api/models/um_position_adl_quantile_estimation_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UmPositionAdlQuantileEstimationResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "adlQuantile", skip_serializing_if = "Option::is_none")] pub adl_quantile: Option>, } impl UmPositionAdlQuantileEstimationResponseInner { #[must_use] pub fn new() -> UmPositionAdlQuantileEstimationResponseInner { UmPositionAdlQuantileEstimationResponseInner { symbol: None, adl_quantile: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/apis/mod.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ src/derivatives_trading_portfolio_margin/websocket_streams/handle.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ use crate::{common::config::ConfigurationWebsocketStreams, models::WebsocketStreamsConnectConfig}; use super::WebsocketStreams; #[derive(Clone)] pub struct WebsocketStreamsHandle { configuration: ConfigurationWebsocketStreams, } impl WebsocketStreamsHandle { #[must_use] pub fn new(configuration: ConfigurationWebsocketStreams) -> Self { Self { configuration } } /// Connects to a WebSocket stream using default configuration. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let streams = handle.connect().await?; /// pub async fn connect(&self) -> anyhow::Result { self.connect_with_config(Default::default()).await } /// Connects to a WebSocket stream with a custom configuration. /// /// # Arguments /// /// * `cfg` - A configuration object specifying connection details for the WebSocket stream. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let `custom_config` = `WebsocketStreamsConnectConfig::default()`; /// let streams = `handle.connect_with_config(custom_config).await`?; /// pub async fn connect_with_config( &self, cfg: WebsocketStreamsConnectConfig, ) -> anyhow::Result { WebsocketStreams::connect(self.configuration.clone(), cfg.streams, cfg.mode).await } } src/derivatives_trading_portfolio_margin/websocket_streams/models/account_config_update.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountConfigUpdate { #[serde(rename = "fs", skip_serializing_if = "Option::is_none")] pub fs: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "ac", skip_serializing_if = "Option::is_none")] pub ac: Option>, } impl AccountConfigUpdate { #[must_use] pub fn new() -> AccountConfigUpdate { AccountConfigUpdate { fs: None, e_uppercase: None, t_uppercase: None, ac: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/account_config_update_ac.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountConfigUpdateAc { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, } impl AccountConfigUpdateAc { #[must_use] pub fn new() -> AccountConfigUpdateAc { AccountConfigUpdateAc { s: None, l: None } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/account_update.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdate { #[serde(rename = "fs", skip_serializing_if = "Option::is_none")] pub fs: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option>, } impl AccountUpdate { #[must_use] pub fn new() -> AccountUpdate { AccountUpdate { fs: None, e_uppercase: None, t_uppercase: None, i: None, a: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/account_update_a.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateA { #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option>, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option>, } impl AccountUpdateA { #[must_use] pub fn new() -> AccountUpdateA { AccountUpdateA { m: None, b_uppercase: None, p_uppercase: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/account_update_a_b_inner.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateABInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "wb", skip_serializing_if = "Option::is_none")] pub wb: Option, #[serde(rename = "cw", skip_serializing_if = "Option::is_none")] pub cw: Option, #[serde(rename = "bc", skip_serializing_if = "Option::is_none")] pub bc: Option, } impl AccountUpdateABInner { #[must_use] pub fn new() -> AccountUpdateABInner { AccountUpdateABInner { a: None, wb: None, cw: None, bc: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/account_update_a_p_inner.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateAPInner { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "pa", skip_serializing_if = "Option::is_none")] pub pa: Option, #[serde(rename = "ep", skip_serializing_if = "Option::is_none")] pub ep: Option, #[serde(rename = "cr", skip_serializing_if = "Option::is_none")] pub cr: Option, #[serde(rename = "up", skip_serializing_if = "Option::is_none")] pub up: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "bep", skip_serializing_if = "Option::is_none")] pub bep: Option, } impl AccountUpdateAPInner { #[must_use] pub fn new() -> AccountUpdateAPInner { AccountUpdateAPInner { s: None, pa: None, ep: None, cr: None, up: None, ps: None, bep: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/balanceupdate.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Balanceupdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "d", skip_serializing_if = "Option::is_none")] pub d: Option, #[serde(rename = "U", skip_serializing_if = "Option::is_none")] pub u_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl Balanceupdate { #[must_use] pub fn new() -> Balanceupdate { Balanceupdate { e_uppercase: None, a: None, d: None, u_uppercase: None, t_uppercase: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/conditional_order_trade_update.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ConditionalOrderTradeUpdate { #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "fs", skip_serializing_if = "Option::is_none")] pub fs: Option, #[serde(rename = "so", skip_serializing_if = "Option::is_none")] pub so: Option>, } impl ConditionalOrderTradeUpdate { #[must_use] pub fn new() -> ConditionalOrderTradeUpdate { ConditionalOrderTradeUpdate { t_uppercase: None, e_uppercase: None, fs: None, so: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/conditional_order_trade_update_so.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ConditionalOrderTradeUpdateSo { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "si", skip_serializing_if = "Option::is_none")] pub si: Option, #[serde(rename = "S", skip_serializing_if = "Option::is_none")] pub s_uppercase: Option, #[serde(rename = "st", skip_serializing_if = "Option::is_none")] pub st: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "sp", skip_serializing_if = "Option::is_none")] pub sp: Option, #[serde(rename = "os", skip_serializing_if = "Option::is_none")] pub os: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "ut", skip_serializing_if = "Option::is_none")] pub ut: Option, #[serde(rename = "R", skip_serializing_if = "Option::is_none")] pub r_uppercase: Option, #[serde(rename = "wt", skip_serializing_if = "Option::is_none")] pub wt: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "cp", skip_serializing_if = "Option::is_none")] pub cp: Option, #[serde(rename = "AP", skip_serializing_if = "Option::is_none")] pub ap_uppercase: Option, #[serde(rename = "cr", skip_serializing_if = "Option::is_none")] pub cr: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "V", skip_serializing_if = "Option::is_none")] pub v_uppercase: Option, #[serde(rename = "gtd", skip_serializing_if = "Option::is_none")] pub gtd: Option, } impl ConditionalOrderTradeUpdateSo { #[must_use] pub fn new() -> ConditionalOrderTradeUpdateSo { ConditionalOrderTradeUpdateSo { s: None, c: None, si: None, s_uppercase: None, st: None, f: None, q: None, p: None, sp: None, os: None, t_uppercase: None, ut: None, r_uppercase: None, wt: None, ps: None, cp: None, ap_uppercase: None, cr: None, i: None, v_uppercase: None, gtd: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/liabilitychange.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Liabilitychange { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, } impl Liabilitychange { #[must_use] pub fn new() -> Liabilitychange { Liabilitychange { e_uppercase: None, a: None, t: None, t_uppercase: None, p: None, i: None, l: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/listenkeyexpired.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Listenkeyexpired { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, } impl Listenkeyexpired { #[must_use] pub fn new() -> Listenkeyexpired { Listenkeyexpired { e_uppercase: None } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/mod.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_config_update; pub use self::account_config_update::AccountConfigUpdate; pub mod account_config_update_ac; pub use self::account_config_update_ac::AccountConfigUpdateAc; pub mod account_update; pub use self::account_update::AccountUpdate; pub mod account_update_a; pub use self::account_update_a::AccountUpdateA; pub mod account_update_a_b_inner; pub use self::account_update_a_b_inner::AccountUpdateABInner; pub mod account_update_a_p_inner; pub use self::account_update_a_p_inner::AccountUpdateAPInner; pub mod balanceupdate; pub use self::balanceupdate::Balanceupdate; pub mod conditional_order_trade_update; pub use self::conditional_order_trade_update::ConditionalOrderTradeUpdate; pub mod conditional_order_trade_update_so; pub use self::conditional_order_trade_update_so::ConditionalOrderTradeUpdateSo; pub mod executionreport; pub use self::executionreport::Executionreport; pub mod liabilitychange; pub use self::liabilitychange::Liabilitychange; pub mod listenkeyexpired; pub use self::listenkeyexpired::Listenkeyexpired; pub mod openorderloss; pub use self::openorderloss::Openorderloss; pub mod openorderloss_o_inner; pub use self::openorderloss_o_inner::OpenorderlossOInner; pub mod order_trade_update; pub use self::order_trade_update::OrderTradeUpdate; pub mod order_trade_update_o; pub use self::order_trade_update_o::OrderTradeUpdateO; pub mod outboundaccountposition; pub use self::outboundaccountposition::Outboundaccountposition; pub mod outboundaccountposition_b_inner; pub use self::outboundaccountposition_b_inner::OutboundaccountpositionBInner; pub mod risklevelchange; pub use self::risklevelchange::Risklevelchange; pub mod user_data_stream_events_response; pub use self::user_data_stream_events_response::UserDataStreamEventsResponse; src/derivatives_trading_portfolio_margin/websocket_streams/models/openorderloss.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Openorderloss { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option>, } impl Openorderloss { #[must_use] pub fn new() -> Openorderloss { Openorderloss { e_uppercase: None, o_uppercase: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/openorderloss_o_inner.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenorderlossOInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, } impl OpenorderlossOInner { #[must_use] pub fn new() -> OpenorderlossOInner { OpenorderlossOInner { a: None, o: None } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/order_trade_update.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTradeUpdate { #[serde(rename = "fs", skip_serializing_if = "Option::is_none")] pub fs: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option>, } impl OrderTradeUpdate { #[must_use] pub fn new() -> OrderTradeUpdate { OrderTradeUpdate { fs: None, e_uppercase: None, t_uppercase: None, i: None, o: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/outboundaccountposition.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Outboundaccountposition { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "U", skip_serializing_if = "Option::is_none")] pub u_uppercase: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option>, } impl Outboundaccountposition { #[must_use] pub fn new() -> Outboundaccountposition { Outboundaccountposition { e_uppercase: None, u: None, u_uppercase: None, b_uppercase: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/outboundaccountposition_b_inner.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OutboundaccountpositionBInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, } impl OutboundaccountpositionBInner { #[must_use] pub fn new() -> OutboundaccountpositionBInner { OutboundaccountpositionBInner { a: None, f: None, l: None, } } } src/derivatives_trading_portfolio_margin/websocket_streams/models/risklevelchange.rs /* * Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Risklevelchange { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "eq", skip_serializing_if = "Option::is_none")] pub eq: Option, #[serde(rename = "ae", skip_serializing_if = "Option::is_none")] pub ae: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, } impl Risklevelchange { #[must_use] pub fn new() -> Risklevelchange { Risklevelchange { e_uppercase: None, u: None, s: None, eq: None, ae: None, m: None, } } } src/derivatives_trading_portfolio_margin_pro/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::derivatives_trading_portfolio_margin_pro; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi::production(configuration); let params = derivatives_trading_portfolio_margin_pro::rest_api::GetPortfolioMarginProAccountInfoParams::default(); let response = client.get_portfolio_margin_pro_account_info(params).await?; ``` src/derivatives_trading_portfolio_margin_pro/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::derivatives_trading_portfolio_margin_pro; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi::production(configuration); let params = derivatives_trading_portfolio_margin_pro::rest_api::GetPortfolioMarginProAccountInfoParams::default(); let response = client.get_portfolio_margin_pro_account_info(params).await?; ``` src/derivatives_trading_portfolio_margin_pro/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::derivatives_trading_portfolio_margin_pro; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi::production(configuration); let params = derivatives_trading_portfolio_margin_pro::rest_api::GetPortfolioMarginProAccountInfoParams::default(); match client.get_portfolio_margin_pro_account_info(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/derivatives_trading_portfolio_margin_pro/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::derivatives_trading_portfolio_margin_pro; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi::production(configuration); let params = derivatives_trading_portfolio_margin_pro::rest_api::GetPortfolioMarginProAccountInfoParams::default(); let response = client.get_portfolio_margin_pro_account_info(params).await?; ``` src/derivatives_trading_portfolio_margin_pro/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::derivatives_trading_portfolio_margin_pro; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi::production(configuration); let params = derivatives_trading_portfolio_margin_pro::rest_api::GetPortfolioMarginProAccountInfoParams::default(); let response = client.get_portfolio_margin_pro_account_info(params).await?; ``` src/derivatives_trading_portfolio_margin_pro/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::derivatives_trading_portfolio_margin_pro; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi::production(configuration); let params = derivatives_trading_portfolio_margin_pro::rest_api::GetPortfolioMarginProAccountInfoParams::default(); let response = client.get_portfolio_margin_pro_account_info(params).await?; ``` src/derivatives_trading_portfolio_margin_pro/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::derivatives_trading_portfolio_margin_pro; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi::production(configuration); let params = derivatives_trading_portfolio_margin_pro::rest_api::GetPortfolioMarginProAccountInfoParams::default(); let response = client.get_portfolio_margin_pro_account_info(params).await?; ``` src/derivatives_trading_portfolio_margin_pro/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::derivatives_trading_portfolio_margin_pro; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi::production(configuration); let params = derivatives_trading_portfolio_margin_pro::rest_api::GetPortfolioMarginProAccountInfoParams::default(); let response = client.get_portfolio_margin_pro_account_info(params).await?; ``` src/derivatives_trading_portfolio_margin_pro/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::derivatives_trading_portfolio_margin_pro; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = derivatives_trading_portfolio_margin_pro::DerivativesTradingPortfolioMarginProRestApi::production(configuration); let params = derivatives_trading_portfolio_margin_pro::rest_api::GetPortfolioMarginProAccountInfoParams::default(); let response = client.get_portfolio_margin_pro_account_info(params).await?; ``` src/derivatives_trading_portfolio_margin_pro/rest_api/apis/mod.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod market_data_api; pub use market_data_api::*; src/derivatives_trading_portfolio_margin_pro/rest_api/models/bnb_transfer_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct BnbTransferResponse { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl BnbTransferResponse { #[must_use] pub fn new() -> BnbTransferResponse { BnbTransferResponse { tran_id: None } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/change_auto_repay_futures_status_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeAutoRepayFuturesStatusResponse { #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ChangeAutoRepayFuturesStatusResponse { #[must_use] pub fn new() -> ChangeAutoRepayFuturesStatusResponse { ChangeAutoRepayFuturesStatusResponse { msg: None } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/fund_auto_collection_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FundAutoCollectionResponse { #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl FundAutoCollectionResponse { #[must_use] pub fn new() -> FundAutoCollectionResponse { FundAutoCollectionResponse { msg: None } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/fund_collection_by_asset_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FundCollectionByAssetResponse { #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl FundCollectionByAssetResponse { #[must_use] pub fn new() -> FundCollectionByAssetResponse { FundCollectionByAssetResponse { msg: None } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/get_auto_repay_futures_status_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAutoRepayFuturesStatusResponse { #[serde(rename = "autoRepay", skip_serializing_if = "Option::is_none")] pub auto_repay: Option, } impl GetAutoRepayFuturesStatusResponse { #[must_use] pub fn new() -> GetAutoRepayFuturesStatusResponse { GetAutoRepayFuturesStatusResponse { auto_repay: None } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/get_portfolio_margin_asset_leverage_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPortfolioMarginAssetLeverageResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, } impl GetPortfolioMarginAssetLeverageResponseInner { #[must_use] pub fn new() -> GetPortfolioMarginAssetLeverageResponseInner { GetPortfolioMarginAssetLeverageResponseInner { asset: None, leverage: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/get_portfolio_margin_pro_account_balance_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPortfolioMarginProAccountBalanceResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde(rename = "crossMarginAsset", skip_serializing_if = "Option::is_none")] pub cross_margin_asset: Option, #[serde( rename = "crossMarginBorrowed", skip_serializing_if = "Option::is_none" )] pub cross_margin_borrowed: Option, #[serde(rename = "crossMarginFree", skip_serializing_if = "Option::is_none")] pub cross_margin_free: Option, #[serde( rename = "crossMarginInterest", skip_serializing_if = "Option::is_none" )] pub cross_margin_interest: Option, #[serde(rename = "crossMarginLocked", skip_serializing_if = "Option::is_none")] pub cross_margin_locked: Option, #[serde(rename = "umWalletBalance", skip_serializing_if = "Option::is_none")] pub um_wallet_balance: Option, #[serde(rename = "umUnrealizedPNL", skip_serializing_if = "Option::is_none")] pub um_unrealized_pnl: Option, #[serde(rename = "cmWalletBalance", skip_serializing_if = "Option::is_none")] pub cm_wallet_balance: Option, #[serde(rename = "cmUnrealizedPNL", skip_serializing_if = "Option::is_none")] pub cm_unrealized_pnl: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "negativeBalance", skip_serializing_if = "Option::is_none")] pub negative_balance: Option, #[serde( rename = "optionWalletBalance", skip_serializing_if = "Option::is_none" )] pub option_wallet_balance: Option, #[serde(rename = "optionEquity", skip_serializing_if = "Option::is_none")] pub option_equity: Option, } impl GetPortfolioMarginProAccountBalanceResponseInner { #[must_use] pub fn new() -> GetPortfolioMarginProAccountBalanceResponseInner { GetPortfolioMarginProAccountBalanceResponseInner { asset: None, total_wallet_balance: None, cross_margin_asset: None, cross_margin_borrowed: None, cross_margin_free: None, cross_margin_interest: None, cross_margin_locked: None, um_wallet_balance: None, um_unrealized_pnl: None, cm_wallet_balance: None, cm_unrealized_pnl: None, update_time: None, negative_balance: None, option_wallet_balance: None, option_equity: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/get_portfolio_margin_pro_account_info_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPortfolioMarginProAccountInfoResponse { #[serde(rename = "uniMMR", skip_serializing_if = "Option::is_none")] pub uni_mmr: Option, #[serde(rename = "accountEquity", skip_serializing_if = "Option::is_none")] pub account_equity: Option, #[serde(rename = "actualEquity", skip_serializing_if = "Option::is_none")] pub actual_equity: Option, #[serde(rename = "accountMaintMargin", skip_serializing_if = "Option::is_none")] pub account_maint_margin: Option, #[serde( rename = "accountInitialMargin", skip_serializing_if = "Option::is_none" )] pub account_initial_margin: Option, #[serde( rename = "totalAvailableBalance", skip_serializing_if = "Option::is_none" )] pub total_available_balance: Option, #[serde(rename = "accountStatus", skip_serializing_if = "Option::is_none")] pub account_status: Option, #[serde(rename = "accountType", skip_serializing_if = "Option::is_none")] pub account_type: Option, } impl GetPortfolioMarginProAccountInfoResponse { #[must_use] pub fn new() -> GetPortfolioMarginProAccountInfoResponse { GetPortfolioMarginProAccountInfoResponse { uni_mmr: None, account_equity: None, actual_equity: None, account_maint_margin: None, account_initial_margin: None, total_available_balance: None, account_status: None, account_type: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/get_portfolio_margin_pro_span_account_info_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPortfolioMarginProSpanAccountInfoResponse { #[serde(rename = "uniMMR", skip_serializing_if = "Option::is_none")] pub uni_mmr: Option, #[serde(rename = "accountEquity", skip_serializing_if = "Option::is_none")] pub account_equity: Option, #[serde(rename = "actualEquity", skip_serializing_if = "Option::is_none")] pub actual_equity: Option, #[serde(rename = "accountMaintMargin", skip_serializing_if = "Option::is_none")] pub account_maint_margin: Option, #[serde(rename = "riskUnitMMList", skip_serializing_if = "Option::is_none")] pub risk_unit_mm_list: Option>, #[serde(rename = "marginMM", skip_serializing_if = "Option::is_none")] pub margin_mm: Option, #[serde(rename = "otherMM", skip_serializing_if = "Option::is_none")] pub other_mm: Option, #[serde(rename = "accountStatus", skip_serializing_if = "Option::is_none")] pub account_status: Option, #[serde(rename = "accountType", skip_serializing_if = "Option::is_none")] pub account_type: Option, } impl GetPortfolioMarginProSpanAccountInfoResponse { #[must_use] pub fn new() -> GetPortfolioMarginProSpanAccountInfoResponse { GetPortfolioMarginProSpanAccountInfoResponse { uni_mmr: None, account_equity: None, actual_equity: None, account_maint_margin: None, risk_unit_mm_list: None, margin_mm: None, other_mm: None, account_status: None, account_type: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/get_portfolio_margin_pro_span_account_info_response_risk_unit_mm_list_inner.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMmListInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "uniMaintainUsd", skip_serializing_if = "Option::is_none")] pub uni_maintain_usd: Option, } impl GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMmListInner { #[must_use] pub fn new() -> GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMmListInner { GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMmListInner { asset: None, uni_maintain_usd: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/get_transferable_earn_asset_balance_for_portfolio_margin_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetTransferableEarnAssetBalanceForPortfolioMarginResponse { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, } impl GetTransferableEarnAssetBalanceForPortfolioMarginResponse { #[must_use] pub fn new() -> GetTransferableEarnAssetBalanceForPortfolioMarginResponse { GetTransferableEarnAssetBalanceForPortfolioMarginResponse { asset: None, amount: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/portfolio_margin_collateral_rate_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PortfolioMarginCollateralRateResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "collateralRate", skip_serializing_if = "Option::is_none")] pub collateral_rate: Option, } impl PortfolioMarginCollateralRateResponseInner { #[must_use] pub fn new() -> PortfolioMarginCollateralRateResponseInner { PortfolioMarginCollateralRateResponseInner { asset: None, collateral_rate: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/portfolio_margin_pro_bankruptcy_loan_repay_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PortfolioMarginProBankruptcyLoanRepayResponse { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl PortfolioMarginProBankruptcyLoanRepayResponse { #[must_use] pub fn new() -> PortfolioMarginProBankruptcyLoanRepayResponse { PortfolioMarginProBankruptcyLoanRepayResponse { tran_id: None } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/portfolio_margin_pro_tiered_collateral_rate_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PortfolioMarginProTieredCollateralRateResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "collateralInfo", skip_serializing_if = "Option::is_none")] pub collateral_info: Option>, } impl PortfolioMarginProTieredCollateralRateResponseInner { #[must_use] pub fn new() -> PortfolioMarginProTieredCollateralRateResponseInner { PortfolioMarginProTieredCollateralRateResponseInner { asset: None, collateral_info: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/portfolio_margin_pro_tiered_collateral_rate_response_inner_collateral_info_inner.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner { #[serde(rename = "tierFloor", skip_serializing_if = "Option::is_none")] pub tier_floor: Option, #[serde(rename = "tierCap", skip_serializing_if = "Option::is_none")] pub tier_cap: Option, #[serde(rename = "collateralRate", skip_serializing_if = "Option::is_none")] pub collateral_rate: Option, #[serde(rename = "cum", skip_serializing_if = "Option::is_none")] pub cum: Option, } impl PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner { #[must_use] pub fn new() -> PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner { PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner { tier_floor: None, tier_cap: None, collateral_rate: None, cum: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/query_portfolio_margin_asset_index_price_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryPortfolioMarginAssetIndexPriceResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "assetIndexPrice", skip_serializing_if = "Option::is_none")] pub asset_index_price: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl QueryPortfolioMarginAssetIndexPriceResponseInner { #[must_use] pub fn new() -> QueryPortfolioMarginAssetIndexPriceResponseInner { QueryPortfolioMarginAssetIndexPriceResponseInner { asset: None, asset_index_price: None, time: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/query_portfolio_margin_pro_bankruptcy_loan_amount_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryPortfolioMarginProBankruptcyLoanAmountResponse { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, } impl QueryPortfolioMarginProBankruptcyLoanAmountResponse { #[must_use] pub fn new() -> QueryPortfolioMarginProBankruptcyLoanAmountResponse { QueryPortfolioMarginProBankruptcyLoanAmountResponse { asset: None, amount: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/query_portfolio_margin_pro_bankruptcy_loan_repay_history_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, } impl QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse { #[must_use] pub fn new() -> QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse { QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse { total: None, rows: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/query_portfolio_margin_pro_bankruptcy_loan_repay_history_response_rows_inner.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "repayTime", skip_serializing_if = "Option::is_none")] pub repay_time: Option, } impl QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner { #[must_use] pub fn new() -> QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner { QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner { asset: None, amount: None, repay_time: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/query_portfolio_margin_pro_negative_balance_interest_history_response_inner.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde( rename = "interestAccruedTime", skip_serializing_if = "Option::is_none" )] pub interest_accrued_time: Option, #[serde(rename = "interestRate", skip_serializing_if = "Option::is_none")] pub interest_rate: Option, #[serde(rename = "principal", skip_serializing_if = "Option::is_none")] pub principal: Option, } impl QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner { #[must_use] pub fn new() -> QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner { QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner { asset: None, interest: None, interest_accrued_time: None, interest_rate: None, principal: None, } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/repay_futures_negative_balance_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RepayFuturesNegativeBalanceResponse { #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl RepayFuturesNegativeBalanceResponse { #[must_use] pub fn new() -> RepayFuturesNegativeBalanceResponse { RepayFuturesNegativeBalanceResponse { msg: None } } } src/derivatives_trading_portfolio_margin_pro/rest_api/models/transfer_ldusdt_for_portfolio_margin_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TransferLdusdtForPortfolioMarginResponse { #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl TransferLdusdtForPortfolioMarginResponse { #[must_use] pub fn new() -> TransferLdusdtForPortfolioMarginResponse { TransferLdusdtForPortfolioMarginResponse { msg: None } } } src/derivatives_trading_portfolio_margin_pro/websocket_streams/apis/mod.rs /* * Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ src/derivatives_trading_portfolio_margin_pro/websocket_streams/handle.rs /* * Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ use crate::{common::config::ConfigurationWebsocketStreams, models::WebsocketStreamsConnectConfig}; use super::WebsocketStreams; #[derive(Clone)] pub struct WebsocketStreamsHandle { configuration: ConfigurationWebsocketStreams, } impl WebsocketStreamsHandle { #[must_use] pub fn new(configuration: ConfigurationWebsocketStreams) -> Self { Self { configuration } } /// Connects to a WebSocket stream using default configuration. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let streams = handle.connect().await?; /// pub async fn connect(&self) -> anyhow::Result { self.connect_with_config(Default::default()).await } /// Connects to a WebSocket stream with a custom configuration. /// /// # Arguments /// /// * `cfg` - A configuration object specifying connection details for the WebSocket stream. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let `custom_config` = `WebsocketStreamsConnectConfig::default()`; /// let streams = `handle.connect_with_config(custom_config).await`?; /// pub async fn connect_with_config( &self, cfg: WebsocketStreamsConnectConfig, ) -> anyhow::Result { WebsocketStreams::connect(self.configuration.clone(), cfg.streams, cfg.mode).await } } src/derivatives_trading_portfolio_margin_pro/websocket_streams/models/mod.rs /* * Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod risklevelchange; pub use self::risklevelchange::Risklevelchange; pub mod user_data_stream_events_response; pub use self::user_data_stream_events_response::UserDataStreamEventsResponse; src/derivatives_trading_portfolio_margin_pro/websocket_streams/models/risklevelchange.rs /* * Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Risklevelchange { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "eq", skip_serializing_if = "Option::is_none")] pub eq: Option, #[serde(rename = "ae", skip_serializing_if = "Option::is_none")] pub ae: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, } impl Risklevelchange { #[must_use] pub fn new() -> Risklevelchange { Risklevelchange { e_uppercase: None, u: None, s: None, eq: None, ae: None, m: None, } } } src/derivatives_trading_portfolio_margin_pro/websocket_streams/models/user_data_stream_events_response.rs /* * Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_portfolio_margin_pro::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(try_from = "Value")] pub enum UserDataStreamEventsResponse { #[serde(rename = "riskLevelChange")] RiskLevelChange(Box), Other(serde_json::Value), } impl Default for UserDataStreamEventsResponse { fn default() -> Self { Self::RiskLevelChange(Default::default()) } } impl TryFrom for UserDataStreamEventsResponse { type Error = serde_json::Error; fn try_from(v: Value) -> Result { let tag = v .get("e") .and_then(Value::as_str) .ok_or_else(|| serde_json::Error::custom("missing field `e`"))?; match tag { "riskLevelChange" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::RiskLevelChange(Box::new( payload, ))) } _ => Ok(UserDataStreamEventsResponse::Other(v)), } } } src/derivatives_trading_usds_futures/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_usds_futures/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_usds_futures/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = algo::AlgoRestApi::production(configuration); let params = algo::rest_api::QueryHistoricalAlgoOrdersSpotAlgoParams::default(); match client.query_historical_algo_orders_spot_algo(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/derivatives_trading_usds_futures/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_usds_futures/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_usds_futures/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_usds_futures/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_usds_futures/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_usds_futures/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesRestApi::production(configuration); let response = client.exchange_information().await?; ``` src/derivatives_trading_usds_futures/docs/websocket_api/agent.md # WebSocket Agent Configuration ```rust use tokio_tungstenite::Connector; use native_tls::{TlsConnector, Protocol}; use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let native_tls = TlsConnector::builder() .min_protocol_version(Some(Protocol::Tlsv12)) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_usds_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_usds_futures/docs/websocket_api/certificate-pinning.md # WebSocket Agent Configuration ```rust use std::fs; use tokio_tungstenite::Connector; use native_tls::{Certificate, TlsConnector, Protocol}; use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let cert_pem = fs::read("/path/to/pinned_cert.pem")?; let cert = Certificate::from_pem(&cert_pem)?; let native_tls = TlsConnector::builder() .add_root_certificate(cert) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_usds_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_usds_futures/docs/websocket_api/connection-mode.md # Connection Mode Configuration ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .mode(models::WebsocketMode::Pool(3)) // Use pool mode with a pool size of 3 .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_usds_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_usds_futures/docs/websocket_api/key-pair-authentication.md # Private Key Configuration ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_usds_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_usds_futures/docs/websocket_api/reconnect-delay.md # Reconnect Delay Configuration ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .reconnect_delay(3000) // Set reconnect delay to 3 seconds .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_usds_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_usds_futures/docs/websocket_api/timeout.md # Timeout Configuration ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(10000) // Set timeout to 10 seconds .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesWsApi::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_usds_futures::websocket_api::AccountInformationParams::default(); let response = connection.account_information(params).await?; ``` src/derivatives_trading_usds_futures/docs/websocket_streams/agent.md # WebSocket Agent Configuration ```rust use tokio_tungstenite::Connector; use native_tls::{TlsConnector, Protocol}; use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let native_tls = TlsConnector::builder() .min_protocol_version(Some(Protocol::Tlsv12)) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_usds_futures::websocket_streams::AllBookTickersStreamParams::default(); let stream = connection.all_book_tickers_stream(params).await?; ``` src/derivatives_trading_usds_futures/docs/websocket_streams/certificate-pinning.md # WebSocket Agent Configuration ```rust use std::fs; use tokio_tungstenite::Connector; use native_tls::{Certificate, TlsConnector, Protocol}; use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let cert_pem = fs::read("/path/to/pinned_cert.pem")?; let cert = Certificate::from_pem(&cert_pem)?; let native_tls = TlsConnector::builder() .add_root_certificate(cert) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_usds_futures::websocket_streams::AllBookTickersStreamParams::default(); let stream = connection.all_book_tickers_stream(params).await?; ``` src/derivatives_trading_usds_futures/docs/websocket_streams/connection-mode.md # Connection Mode Configuration ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .mode(models::WebsocketMode::Pool(3)) // Use pool mode with a pool size of 3 .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_usds_futures::websocket_streams::AllBookTickersStreamParams::default(); let stream = connection.all_book_tickers_stream(params).await?; ``` src/derivatives_trading_usds_futures/docs/websocket_streams/reconnect-delay.md # Reconnect Delay Configuration ```rust use binance_sdk::derivatives_trading_usds_futures; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .reconnect_delay(3000) // Set reconnect delay to 3 seconds .build()?; let client = derivatives_trading_usds_futures::DerivativesTradingUsdsFuturesWsStreams::production(configuration); let connection = client.connect().await?; let params = derivatives_trading_usds_futures::websocket_streams::AllBookTickersStreamParams::default(); let stream = connection.all_book_tickers_stream(params).await?; ``` src/derivatives_trading_usds_futures/rest_api/apis/mod.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod convert_api; pub use convert_api::*; pub mod market_data_api; pub use market_data_api::*; pub mod portfolio_margin_endpoints_api; pub use portfolio_margin_endpoints_api::*; pub mod trade_api; pub use trade_api::*; pub mod user_data_streams_api; pub use user_data_streams_api::*; src/derivatives_trading_usds_futures/rest_api/models/accept_the_offered_quote_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcceptTheOfferedQuoteResponse { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "orderStatus", skip_serializing_if = "Option::is_none")] pub order_status: Option, } impl AcceptTheOfferedQuoteResponse { #[must_use] pub fn new() -> AcceptTheOfferedQuoteResponse { AcceptTheOfferedQuoteResponse { order_id: None, create_time: None, order_status: None, } } } src/derivatives_trading_usds_futures/rest_api/models/account_information_v2_response_assets_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationV2ResponseAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "marginAvailable", skip_serializing_if = "Option::is_none")] pub margin_available: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountInformationV2ResponseAssetsInner { #[must_use] pub fn new() -> AccountInformationV2ResponseAssetsInner { AccountInformationV2ResponseAssetsInner { asset: None, wallet_balance: None, unrealized_profit: None, margin_balance: None, maint_margin: None, initial_margin: None, position_initial_margin: None, open_order_initial_margin: None, cross_wallet_balance: None, cross_un_pnl: None, available_balance: None, max_withdraw_amount: None, margin_available: None, update_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/account_information_v2_response_positions_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationV2ResponsePositionsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "isolated", skip_serializing_if = "Option::is_none")] pub isolated: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "maxNotional", skip_serializing_if = "Option::is_none")] pub max_notional: Option, #[serde(rename = "bidNotional", skip_serializing_if = "Option::is_none")] pub bid_notional: Option, #[serde(rename = "askNotional", skip_serializing_if = "Option::is_none")] pub ask_notional: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountInformationV2ResponsePositionsInner { #[must_use] pub fn new() -> AccountInformationV2ResponsePositionsInner { AccountInformationV2ResponsePositionsInner { symbol: None, initial_margin: None, maint_margin: None, unrealized_profit: None, position_initial_margin: None, open_order_initial_margin: None, leverage: None, isolated: None, entry_price: None, max_notional: None, bid_notional: None, ask_notional: None, position_side: None, position_amt: None, update_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/account_information_v3_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationV3Response { #[serde(rename = "totalInitialMargin", skip_serializing_if = "Option::is_none")] pub total_initial_margin: Option, #[serde(rename = "totalMaintMargin", skip_serializing_if = "Option::is_none")] pub total_maint_margin: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde( rename = "totalUnrealizedProfit", skip_serializing_if = "Option::is_none" )] pub total_unrealized_profit: Option, #[serde(rename = "totalMarginBalance", skip_serializing_if = "Option::is_none")] pub total_margin_balance: Option, #[serde( rename = "totalPositionInitialMargin", skip_serializing_if = "Option::is_none" )] pub total_position_initial_margin: Option, #[serde( rename = "totalOpenOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub total_open_order_initial_margin: Option, #[serde( rename = "totalCrossWalletBalance", skip_serializing_if = "Option::is_none" )] pub total_cross_wallet_balance: Option, #[serde(rename = "totalCrossUnPnl", skip_serializing_if = "Option::is_none")] pub total_cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "positions", skip_serializing_if = "Option::is_none")] pub positions: Option>, } impl AccountInformationV3Response { #[must_use] pub fn new() -> AccountInformationV3Response { AccountInformationV3Response { total_initial_margin: None, total_maint_margin: None, total_wallet_balance: None, total_unrealized_profit: None, total_margin_balance: None, total_position_initial_margin: None, total_open_order_initial_margin: None, total_cross_wallet_balance: None, total_cross_un_pnl: None, available_balance: None, max_withdraw_amount: None, assets: None, positions: None, } } } src/derivatives_trading_usds_futures/rest_api/models/account_information_v3_response_assets_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationV3ResponseAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountInformationV3ResponseAssetsInner { #[must_use] pub fn new() -> AccountInformationV3ResponseAssetsInner { AccountInformationV3ResponseAssetsInner { asset: None, wallet_balance: None, unrealized_profit: None, margin_balance: None, maint_margin: None, initial_margin: None, position_initial_margin: None, open_order_initial_margin: None, cross_wallet_balance: None, cross_un_pnl: None, available_balance: None, max_withdraw_amount: None, update_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/account_information_v3_response_positions_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationV3ResponsePositionsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "isolatedMargin", skip_serializing_if = "Option::is_none")] pub isolated_margin: Option, #[serde(rename = "notional", skip_serializing_if = "Option::is_none")] pub notional: Option, #[serde(rename = "isolatedWallet", skip_serializing_if = "Option::is_none")] pub isolated_wallet: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountInformationV3ResponsePositionsInner { #[must_use] pub fn new() -> AccountInformationV3ResponsePositionsInner { AccountInformationV3ResponsePositionsInner { symbol: None, position_side: None, position_amt: None, unrealized_profit: None, isolated_margin: None, notional: None, isolated_wallet: None, initial_margin: None, maint_margin: None, update_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/account_trade_list_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountTradeListResponseInner { #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "realizedPnl", skip_serializing_if = "Option::is_none")] pub realized_pnl: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl AccountTradeListResponseInner { #[must_use] pub fn new() -> AccountTradeListResponseInner { AccountTradeListResponseInner { buyer: None, commission: None, commission_asset: None, id: None, maker: None, order_id: None, price: None, qty: None, quote_qty: None, realized_pnl: None, side: None, position_side: None, symbol: None, time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/auto_cancel_all_open_orders_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AutoCancelAllOpenOrdersResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "countdownTime", skip_serializing_if = "Option::is_none")] pub countdown_time: Option, } impl AutoCancelAllOpenOrdersResponse { #[must_use] pub fn new() -> AutoCancelAllOpenOrdersResponse { AutoCancelAllOpenOrdersResponse { symbol: None, countdown_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/basis_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct BasisResponseInner { #[serde(rename = "indexPrice", skip_serializing_if = "Option::is_none")] pub index_price: Option, #[serde(rename = "contractType", skip_serializing_if = "Option::is_none")] pub contract_type: Option, #[serde(rename = "basisRate", skip_serializing_if = "Option::is_none")] pub basis_rate: Option, #[serde(rename = "futuresPrice", skip_serializing_if = "Option::is_none")] pub futures_price: Option, #[serde( rename = "annualizedBasisRate", skip_serializing_if = "Option::is_none" )] pub annualized_basis_rate: Option, #[serde(rename = "basis", skip_serializing_if = "Option::is_none")] pub basis: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl BasisResponseInner { #[must_use] pub fn new() -> BasisResponseInner { BasisResponseInner { index_price: None, contract_type: None, basis_rate: None, futures_price: None, annualized_basis_rate: None, basis: None, pair: None, timestamp: None, } } } src/derivatives_trading_usds_futures/rest_api/models/cancel_algo_order_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAlgoOrderResponse { #[serde(rename = "algoId", skip_serializing_if = "Option::is_none")] pub algo_id: Option, #[serde(rename = "clientAlgoId", skip_serializing_if = "Option::is_none")] pub client_algo_id: Option, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAlgoOrderResponse { #[must_use] pub fn new() -> CancelAlgoOrderResponse { CancelAlgoOrderResponse { algo_id: None, client_algo_id: None, code: None, msg: None, } } } src/derivatives_trading_usds_futures/rest_api/models/cancel_all_algo_open_orders_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAllAlgoOpenOrdersResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAllAlgoOpenOrdersResponse { #[must_use] pub fn new() -> CancelAllAlgoOpenOrdersResponse { CancelAllAlgoOpenOrdersResponse { code: None, msg: None, } } } src/derivatives_trading_usds_futures/rest_api/models/cancel_all_open_orders_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAllOpenOrdersResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl CancelAllOpenOrdersResponse { #[must_use] pub fn new() -> CancelAllOpenOrdersResponse { CancelAllOpenOrdersResponse { code: None, msg: None, } } } src/derivatives_trading_usds_futures/rest_api/models/change_initial_leverage_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeInitialLeverageResponse { #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "maxNotionalValue", skip_serializing_if = "Option::is_none")] pub max_notional_value: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, } impl ChangeInitialLeverageResponse { #[must_use] pub fn new() -> ChangeInitialLeverageResponse { ChangeInitialLeverageResponse { leverage: None, max_notional_value: None, symbol: None, } } } src/derivatives_trading_usds_futures/rest_api/models/change_margin_type_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeMarginTypeResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ChangeMarginTypeResponse { #[must_use] pub fn new() -> ChangeMarginTypeResponse { ChangeMarginTypeResponse { code: None, msg: None, } } } src/derivatives_trading_usds_futures/rest_api/models/change_multi_assets_mode_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeMultiAssetsModeResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ChangeMultiAssetsModeResponse { #[must_use] pub fn new() -> ChangeMultiAssetsModeResponse { ChangeMultiAssetsModeResponse { code: None, msg: None, } } } src/derivatives_trading_usds_futures/rest_api/models/change_position_mode_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangePositionModeResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ChangePositionModeResponse { #[must_use] pub fn new() -> ChangePositionModeResponse { ChangePositionModeResponse { code: None, msg: None, } } } src/derivatives_trading_usds_futures/rest_api/models/check_server_time_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckServerTimeResponse { #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, } impl CheckServerTimeResponse { #[must_use] pub fn new() -> CheckServerTimeResponse { CheckServerTimeResponse { server_time: None } } } src/derivatives_trading_usds_futures/rest_api/models/classic_portfolio_margin_account_information_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ClassicPortfolioMarginAccountInformationResponse { #[serde( rename = "maxWithdrawAmountUSD", skip_serializing_if = "Option::is_none" )] pub max_withdraw_amount_usd: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, } impl ClassicPortfolioMarginAccountInformationResponse { #[must_use] pub fn new() -> ClassicPortfolioMarginAccountInformationResponse { ClassicPortfolioMarginAccountInformationResponse { max_withdraw_amount_usd: None, asset: None, max_withdraw_amount: None, } } } src/derivatives_trading_usds_futures/rest_api/models/composite_index_symbol_information_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CompositeIndexSymbolInformationResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "component", skip_serializing_if = "Option::is_none")] pub component: Option, #[serde(rename = "baseAssetList", skip_serializing_if = "Option::is_none")] pub base_asset_list: Option>, } impl CompositeIndexSymbolInformationResponseInner { #[must_use] pub fn new() -> CompositeIndexSymbolInformationResponseInner { CompositeIndexSymbolInformationResponseInner { symbol: None, time: None, component: None, base_asset_list: None, } } } src/derivatives_trading_usds_futures/rest_api/models/composite_index_symbol_information_response_inner_base_asset_list_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CompositeIndexSymbolInformationResponseInnerBaseAssetListInner { #[serde(rename = "baseAsset", skip_serializing_if = "Option::is_none")] pub base_asset: Option, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option, #[serde(rename = "weightInQuantity", skip_serializing_if = "Option::is_none")] pub weight_in_quantity: Option, #[serde(rename = "weightInPercentage", skip_serializing_if = "Option::is_none")] pub weight_in_percentage: Option, } impl CompositeIndexSymbolInformationResponseInnerBaseAssetListInner { #[must_use] pub fn new() -> CompositeIndexSymbolInformationResponseInnerBaseAssetListInner { CompositeIndexSymbolInformationResponseInnerBaseAssetListInner { base_asset: None, quote_asset: None, weight_in_quantity: None, weight_in_percentage: None, } } } src/derivatives_trading_usds_futures/rest_api/models/compressed_aggregate_trades_list_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CompressedAggregateTradesListResponseInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, } impl CompressedAggregateTradesListResponseInner { #[must_use] pub fn new() -> CompressedAggregateTradesListResponseInner { CompressedAggregateTradesListResponseInner { a: None, p: None, q: None, f: None, l: None, t_uppercase: None, m: None, } } } src/derivatives_trading_usds_futures/rest_api/models/continuous_contract_kline_candlestick_data_response_item_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum ContinuousContractKlineCandlestickDataResponseItemInner { Integer(i64), String(String), Other(serde_json::Value), } impl Default for ContinuousContractKlineCandlestickDataResponseItemInner { fn default() -> Self { Self::Integer(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/exchange_information_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponse { #[serde(rename = "exchangeFilters", skip_serializing_if = "Option::is_none")] pub exchange_filters: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")] pub symbols: Option>, #[serde(rename = "timezone", skip_serializing_if = "Option::is_none")] pub timezone: Option, } impl ExchangeInformationResponse { #[must_use] pub fn new() -> ExchangeInformationResponse { ExchangeInformationResponse { exchange_filters: None, rate_limits: None, server_time: None, assets: None, symbols: None, timezone: None, } } } src/derivatives_trading_usds_futures/rest_api/models/exchange_information_response_assets_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponseAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "marginAvailable", skip_serializing_if = "Option::is_none")] pub margin_available: Option, #[serde(rename = "autoAssetExchange", skip_serializing_if = "Option::is_none")] pub auto_asset_exchange: Option, } impl ExchangeInformationResponseAssetsInner { #[must_use] pub fn new() -> ExchangeInformationResponseAssetsInner { ExchangeInformationResponseAssetsInner { asset: None, margin_available: None, auto_asset_exchange: None, } } } src/derivatives_trading_usds_futures/rest_api/models/exchange_information_response_rate_limits_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponseRateLimitsInner { #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, } impl ExchangeInformationResponseRateLimitsInner { #[must_use] pub fn new() -> ExchangeInformationResponseRateLimitsInner { ExchangeInformationResponseRateLimitsInner { interval: None, interval_num: None, limit: None, rate_limit_type: None, } } } src/derivatives_trading_usds_futures/rest_api/models/exchange_information_response_symbols_inner_filters_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInformationResponseSymbolsInnerFiltersInner { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxPrice", skip_serializing_if = "Option::is_none")] pub max_price: Option, #[serde(rename = "minPrice", skip_serializing_if = "Option::is_none")] pub min_price: Option, #[serde(rename = "tickSize", skip_serializing_if = "Option::is_none")] pub tick_size: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "minQty", skip_serializing_if = "Option::is_none")] pub min_qty: Option, #[serde(rename = "stepSize", skip_serializing_if = "Option::is_none")] pub step_size: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "notional", skip_serializing_if = "Option::is_none")] pub notional: Option, #[serde(rename = "multiplierUp", skip_serializing_if = "Option::is_none")] pub multiplier_up: Option, #[serde(rename = "multiplierDown", skip_serializing_if = "Option::is_none")] pub multiplier_down: Option, #[serde(rename = "multiplierDecimal", skip_serializing_if = "Option::is_none")] pub multiplier_decimal: Option, } impl ExchangeInformationResponseSymbolsInnerFiltersInner { #[must_use] pub fn new() -> ExchangeInformationResponseSymbolsInnerFiltersInner { ExchangeInformationResponseSymbolsInnerFiltersInner { filter_type: None, max_price: None, min_price: None, tick_size: None, max_qty: None, min_qty: None, step_size: None, limit: None, notional: None, multiplier_up: None, multiplier_down: None, multiplier_decimal: None, } } } src/derivatives_trading_usds_futures/rest_api/models/futures_account_balance_v2_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesAccountBalanceV2ResponseInner { #[serde(rename = "accountAlias", skip_serializing_if = "Option::is_none")] pub account_alias: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "balance", skip_serializing_if = "Option::is_none")] pub balance: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "marginAvailable", skip_serializing_if = "Option::is_none")] pub margin_available: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl FuturesAccountBalanceV2ResponseInner { #[must_use] pub fn new() -> FuturesAccountBalanceV2ResponseInner { FuturesAccountBalanceV2ResponseInner { account_alias: None, asset: None, balance: None, cross_wallet_balance: None, cross_un_pnl: None, available_balance: None, max_withdraw_amount: None, margin_available: None, update_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/futures_account_configuration_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesAccountConfigurationResponse { #[serde(rename = "feeTier", skip_serializing_if = "Option::is_none")] pub fee_tier: Option, #[serde(rename = "canTrade", skip_serializing_if = "Option::is_none")] pub can_trade: Option, #[serde(rename = "canDeposit", skip_serializing_if = "Option::is_none")] pub can_deposit: Option, #[serde(rename = "canWithdraw", skip_serializing_if = "Option::is_none")] pub can_withdraw: Option, #[serde(rename = "dualSidePosition", skip_serializing_if = "Option::is_none")] pub dual_side_position: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "multiAssetsMargin", skip_serializing_if = "Option::is_none")] pub multi_assets_margin: Option, #[serde(rename = "tradeGroupId", skip_serializing_if = "Option::is_none")] pub trade_group_id: Option, } impl FuturesAccountConfigurationResponse { #[must_use] pub fn new() -> FuturesAccountConfigurationResponse { FuturesAccountConfigurationResponse { fee_tier: None, can_trade: None, can_deposit: None, can_withdraw: None, dual_side_position: None, update_time: None, multi_assets_margin: None, trade_group_id: None, } } } src/derivatives_trading_usds_futures/rest_api/models/futures_trading_quantitative_rules_indicators_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesTradingQuantitativeRulesIndicatorsResponse { #[serde(rename = "indicators", skip_serializing_if = "Option::is_none")] pub indicators: Option>, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl FuturesTradingQuantitativeRulesIndicatorsResponse { #[must_use] pub fn new() -> FuturesTradingQuantitativeRulesIndicatorsResponse { FuturesTradingQuantitativeRulesIndicatorsResponse { indicators: None, update_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/futures_trading_quantitative_rules_indicators_response_indicators.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesTradingQuantitativeRulesIndicatorsResponseIndicators { #[serde(rename = "BTCUSDT", skip_serializing_if = "Option::is_none")] pub btcusdt: Option< Vec, >, #[serde(rename = "ETHUSDT", skip_serializing_if = "Option::is_none")] pub ethusdt: Option< Vec, >, #[serde(rename = "ACCOUNT", skip_serializing_if = "Option::is_none")] pub account: Option< Vec, >, } impl FuturesTradingQuantitativeRulesIndicatorsResponseIndicators { #[must_use] pub fn new() -> FuturesTradingQuantitativeRulesIndicatorsResponseIndicators { FuturesTradingQuantitativeRulesIndicatorsResponseIndicators { btcusdt: None, ethusdt: None, account: None, } } } src/derivatives_trading_usds_futures/rest_api/models/futures_trading_quantitative_rules_indicators_response_indicators_account_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsAccountInner { #[serde(rename = "indicator", skip_serializing_if = "Option::is_none")] pub indicator: Option, #[serde(rename = "value", skip_serializing_if = "Option::is_none")] pub value: Option, #[serde(rename = "triggerValue", skip_serializing_if = "Option::is_none")] pub trigger_value: Option, #[serde(rename = "plannedRecoverTime", skip_serializing_if = "Option::is_none")] pub planned_recover_time: Option, #[serde(rename = "isLocked", skip_serializing_if = "Option::is_none")] pub is_locked: Option, } impl FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsAccountInner { #[must_use] pub fn new() -> FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsAccountInner { FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsAccountInner { indicator: None, value: None, trigger_value: None, planned_recover_time: None, is_locked: None, } } } src/derivatives_trading_usds_futures/rest_api/models/futures_trading_quantitative_rules_indicators_response_indicators_btcusdt_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBtcusdtInner { #[serde(rename = "isLocked", skip_serializing_if = "Option::is_none")] pub is_locked: Option, #[serde(rename = "plannedRecoverTime", skip_serializing_if = "Option::is_none")] pub planned_recover_time: Option, #[serde(rename = "indicator", skip_serializing_if = "Option::is_none")] pub indicator: Option, #[serde(rename = "value", skip_serializing_if = "Option::is_none")] pub value: Option, #[serde(rename = "triggerValue", skip_serializing_if = "Option::is_none")] pub trigger_value: Option, } impl FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBtcusdtInner { #[must_use] pub fn new() -> FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBtcusdtInner { FuturesTradingQuantitativeRulesIndicatorsResponseIndicatorsBtcusdtInner { is_locked: None, planned_recover_time: None, indicator: None, value: None, trigger_value: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_bnb_burn_status_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBnbBurnStatusResponse { #[serde(rename = "feeBurn", skip_serializing_if = "Option::is_none")] pub fee_burn: Option, } impl GetBnbBurnStatusResponse { #[must_use] pub fn new() -> GetBnbBurnStatusResponse { GetBnbBurnStatusResponse { fee_burn: None } } } src/derivatives_trading_usds_futures/rest_api/models/get_current_multi_assets_mode_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCurrentMultiAssetsModeResponse { #[serde(rename = "multiAssetsMargin", skip_serializing_if = "Option::is_none")] pub multi_assets_margin: Option, } impl GetCurrentMultiAssetsModeResponse { #[must_use] pub fn new() -> GetCurrentMultiAssetsModeResponse { GetCurrentMultiAssetsModeResponse { multi_assets_margin: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_current_position_mode_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCurrentPositionModeResponse { #[serde(rename = "dualSidePosition", skip_serializing_if = "Option::is_none")] pub dual_side_position: Option, } impl GetCurrentPositionModeResponse { #[must_use] pub fn new() -> GetCurrentPositionModeResponse { GetCurrentPositionModeResponse { dual_side_position: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_download_id_for_futures_order_history_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDownloadIdForFuturesOrderHistoryResponse { #[serde( rename = "avgCostTimestampOfLast30d", skip_serializing_if = "Option::is_none" )] pub avg_cost_timestamp_of_last30d: Option, #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, } impl GetDownloadIdForFuturesOrderHistoryResponse { #[must_use] pub fn new() -> GetDownloadIdForFuturesOrderHistoryResponse { GetDownloadIdForFuturesOrderHistoryResponse { avg_cost_timestamp_of_last30d: None, download_id: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_download_id_for_futures_trade_history_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDownloadIdForFuturesTradeHistoryResponse { #[serde( rename = "avgCostTimestampOfLast30d", skip_serializing_if = "Option::is_none" )] pub avg_cost_timestamp_of_last30d: Option, #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, } impl GetDownloadIdForFuturesTradeHistoryResponse { #[must_use] pub fn new() -> GetDownloadIdForFuturesTradeHistoryResponse { GetDownloadIdForFuturesTradeHistoryResponse { avg_cost_timestamp_of_last30d: None, download_id: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_download_id_for_futures_transaction_history_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDownloadIdForFuturesTransactionHistoryResponse { #[serde( rename = "avgCostTimestampOfLast30d", skip_serializing_if = "Option::is_none" )] pub avg_cost_timestamp_of_last30d: Option, #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, } impl GetDownloadIdForFuturesTransactionHistoryResponse { #[must_use] pub fn new() -> GetDownloadIdForFuturesTransactionHistoryResponse { GetDownloadIdForFuturesTransactionHistoryResponse { avg_cost_timestamp_of_last30d: None, download_id: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_funding_rate_history_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFundingRateHistoryResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "fundingRate", skip_serializing_if = "Option::is_none")] pub funding_rate: Option, #[serde(rename = "fundingTime", skip_serializing_if = "Option::is_none")] pub funding_time: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, } impl GetFundingRateHistoryResponseInner { #[must_use] pub fn new() -> GetFundingRateHistoryResponseInner { GetFundingRateHistoryResponseInner { symbol: None, funding_rate: None, funding_time: None, mark_price: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_funding_rate_info_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFundingRateInfoResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde( rename = "adjustedFundingRateCap", skip_serializing_if = "Option::is_none" )] pub adjusted_funding_rate_cap: Option, #[serde( rename = "adjustedFundingRateFloor", skip_serializing_if = "Option::is_none" )] pub adjusted_funding_rate_floor: Option, #[serde( rename = "fundingIntervalHours", skip_serializing_if = "Option::is_none" )] pub funding_interval_hours: Option, #[serde(rename = "disclaimer", skip_serializing_if = "Option::is_none")] pub disclaimer: Option, } impl GetFundingRateInfoResponseInner { #[must_use] pub fn new() -> GetFundingRateInfoResponseInner { GetFundingRateInfoResponseInner { symbol: None, adjusted_funding_rate_cap: None, adjusted_funding_rate_floor: None, funding_interval_hours: None, disclaimer: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_futures_order_history_download_link_by_id_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesOrderHistoryDownloadLinkByIdResponse { #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "notified", skip_serializing_if = "Option::is_none")] pub notified: Option, #[serde( rename = "expirationTimestamp", skip_serializing_if = "Option::is_none" )] pub expiration_timestamp: Option, #[serde(rename = "isExpired", skip_serializing_if = "Option::is_none")] pub is_expired: Option, } impl GetFuturesOrderHistoryDownloadLinkByIdResponse { #[must_use] pub fn new() -> GetFuturesOrderHistoryDownloadLinkByIdResponse { GetFuturesOrderHistoryDownloadLinkByIdResponse { download_id: None, status: None, url: None, notified: None, expiration_timestamp: None, is_expired: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_futures_trade_download_link_by_id_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesTradeDownloadLinkByIdResponse { #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "notified", skip_serializing_if = "Option::is_none")] pub notified: Option, #[serde( rename = "expirationTimestamp", skip_serializing_if = "Option::is_none" )] pub expiration_timestamp: Option, #[serde(rename = "isExpired", skip_serializing_if = "Option::is_none")] pub is_expired: Option, } impl GetFuturesTradeDownloadLinkByIdResponse { #[must_use] pub fn new() -> GetFuturesTradeDownloadLinkByIdResponse { GetFuturesTradeDownloadLinkByIdResponse { download_id: None, status: None, url: None, notified: None, expiration_timestamp: None, is_expired: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_futures_transaction_history_download_link_by_id_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesTransactionHistoryDownloadLinkByIdResponse { #[serde(rename = "downloadId", skip_serializing_if = "Option::is_none")] pub download_id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "notified", skip_serializing_if = "Option::is_none")] pub notified: Option, #[serde( rename = "expirationTimestamp", skip_serializing_if = "Option::is_none" )] pub expiration_timestamp: Option, #[serde(rename = "isExpired", skip_serializing_if = "Option::is_none")] pub is_expired: Option, } impl GetFuturesTransactionHistoryDownloadLinkByIdResponse { #[must_use] pub fn new() -> GetFuturesTransactionHistoryDownloadLinkByIdResponse { GetFuturesTransactionHistoryDownloadLinkByIdResponse { download_id: None, status: None, url: None, notified: None, expiration_timestamp: None, is_expired: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_income_history_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetIncomeHistoryResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "incomeType", skip_serializing_if = "Option::is_none")] pub income_type: Option, #[serde(rename = "income", skip_serializing_if = "Option::is_none")] pub income: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, } impl GetIncomeHistoryResponseInner { #[must_use] pub fn new() -> GetIncomeHistoryResponseInner { GetIncomeHistoryResponseInner { symbol: None, income_type: None, income: None, asset: None, info: None, time: None, tran_id: None, trade_id: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_order_modify_history_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderModifyHistoryResponseInner { #[serde(rename = "amendmentId", skip_serializing_if = "Option::is_none")] pub amendment_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "pair", skip_serializing_if = "Option::is_none")] pub pair: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "amendment", skip_serializing_if = "Option::is_none")] pub amendment: Option>, } impl GetOrderModifyHistoryResponseInner { #[must_use] pub fn new() -> GetOrderModifyHistoryResponseInner { GetOrderModifyHistoryResponseInner { amendment_id: None, symbol: None, pair: None, order_id: None, client_order_id: None, time: None, amendment: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_order_modify_history_response_inner_amendment.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderModifyHistoryResponseInnerAmendment { #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option>, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option>, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl GetOrderModifyHistoryResponseInnerAmendment { #[must_use] pub fn new() -> GetOrderModifyHistoryResponseInnerAmendment { GetOrderModifyHistoryResponseInnerAmendment { price: None, orig_qty: None, count: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_order_modify_history_response_inner_amendment_orig_qty.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderModifyHistoryResponseInnerAmendmentOrigQty { #[serde(rename = "before", skip_serializing_if = "Option::is_none")] pub before: Option, #[serde(rename = "after", skip_serializing_if = "Option::is_none")] pub after: Option, } impl GetOrderModifyHistoryResponseInnerAmendmentOrigQty { #[must_use] pub fn new() -> GetOrderModifyHistoryResponseInnerAmendmentOrigQty { GetOrderModifyHistoryResponseInnerAmendmentOrigQty { before: None, after: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_order_modify_history_response_inner_amendment_price.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderModifyHistoryResponseInnerAmendmentPrice { #[serde(rename = "before", skip_serializing_if = "Option::is_none")] pub before: Option, #[serde(rename = "after", skip_serializing_if = "Option::is_none")] pub after: Option, } impl GetOrderModifyHistoryResponseInnerAmendmentPrice { #[must_use] pub fn new() -> GetOrderModifyHistoryResponseInnerAmendmentPrice { GetOrderModifyHistoryResponseInnerAmendmentPrice { before: None, after: None, } } } src/derivatives_trading_usds_futures/rest_api/models/get_position_margin_change_history_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPositionMarginChangeHistoryResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "deltaType", skip_serializing_if = "Option::is_none")] pub delta_type: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, } impl GetPositionMarginChangeHistoryResponseInner { #[must_use] pub fn new() -> GetPositionMarginChangeHistoryResponseInner { GetPositionMarginChangeHistoryResponseInner { symbol: None, r#type: None, delta_type: None, amount: None, asset: None, time: None, position_side: None, } } } src/derivatives_trading_usds_futures/rest_api/models/index_price_kline_candlestick_data_response_item_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum IndexPriceKlineCandlestickDataResponseItemInner { Integer(i64), String(String), Other(serde_json::Value), } impl Default for IndexPriceKlineCandlestickDataResponseItemInner { fn default() -> Self { Self::Integer(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/keepalive_user_data_stream_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KeepaliveUserDataStreamResponse { #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl KeepaliveUserDataStreamResponse { #[must_use] pub fn new() -> KeepaliveUserDataStreamResponse { KeepaliveUserDataStreamResponse { listen_key: None } } } src/derivatives_trading_usds_futures/rest_api/models/kline_candlestick_data_response_item_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum KlineCandlestickDataResponseItemInner { Integer(i64), String(String), Other(serde_json::Value), } impl Default for KlineCandlestickDataResponseItemInner { fn default() -> Self { Self::Integer(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/list_all_convert_pairs_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ListAllConvertPairsResponseInner { #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")] pub from_asset: Option, #[serde(rename = "toAsset", skip_serializing_if = "Option::is_none")] pub to_asset: Option, #[serde(rename = "fromAssetMinAmount", skip_serializing_if = "Option::is_none")] pub from_asset_min_amount: Option, #[serde(rename = "fromAssetMaxAmount", skip_serializing_if = "Option::is_none")] pub from_asset_max_amount: Option, #[serde(rename = "toAssetMinAmount", skip_serializing_if = "Option::is_none")] pub to_asset_min_amount: Option, #[serde(rename = "toAssetMaxAmount", skip_serializing_if = "Option::is_none")] pub to_asset_max_amount: Option, } impl ListAllConvertPairsResponseInner { #[must_use] pub fn new() -> ListAllConvertPairsResponseInner { ListAllConvertPairsResponseInner { from_asset: None, to_asset: None, from_asset_min_amount: None, from_asset_max_amount: None, to_asset_min_amount: None, to_asset_max_amount: None, } } } src/derivatives_trading_usds_futures/rest_api/models/long_short_ratio_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct LongShortRatioResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "longShortRatio", skip_serializing_if = "Option::is_none")] pub long_short_ratio: Option, #[serde(rename = "longAccount", skip_serializing_if = "Option::is_none")] pub long_account: Option, #[serde(rename = "shortAccount", skip_serializing_if = "Option::is_none")] pub short_account: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl LongShortRatioResponseInner { #[must_use] pub fn new() -> LongShortRatioResponseInner { LongShortRatioResponseInner { symbol: None, long_short_ratio: None, long_account: None, short_account: None, timestamp: None, } } } src/derivatives_trading_usds_futures/rest_api/models/mark_price_kline_candlestick_data_response_item_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum MarkPriceKlineCandlestickDataResponseItemInner { Integer(i64), String(String), Other(serde_json::Value), } impl Default for MarkPriceKlineCandlestickDataResponseItemInner { fn default() -> Self { Self::Integer(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/mark_price_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum MarkPriceResponse { MarkPriceResponse1(Box), MarkPriceResponse2(Vec), Other(serde_json::Value), } impl Default for MarkPriceResponse { fn default() -> Self { Self::MarkPriceResponse1(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/mark_price_response1.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarkPriceResponse1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "indexPrice", skip_serializing_if = "Option::is_none")] pub index_price: Option, #[serde( rename = "estimatedSettlePrice", skip_serializing_if = "Option::is_none" )] pub estimated_settle_price: Option, #[serde(rename = "lastFundingRate", skip_serializing_if = "Option::is_none")] pub last_funding_rate: Option, #[serde(rename = "interestRate", skip_serializing_if = "Option::is_none")] pub interest_rate: Option, #[serde(rename = "nextFundingTime", skip_serializing_if = "Option::is_none")] pub next_funding_time: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl MarkPriceResponse1 { #[must_use] pub fn new() -> MarkPriceResponse1 { MarkPriceResponse1 { symbol: None, mark_price: None, index_price: None, estimated_settle_price: None, last_funding_rate: None, interest_rate: None, next_funding_time: None, time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/mark_price_response2_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarkPriceResponse2Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "indexPrice", skip_serializing_if = "Option::is_none")] pub index_price: Option, #[serde( rename = "estimatedSettlePrice", skip_serializing_if = "Option::is_none" )] pub estimated_settle_price: Option, #[serde(rename = "lastFundingRate", skip_serializing_if = "Option::is_none")] pub last_funding_rate: Option, #[serde(rename = "interestRate", skip_serializing_if = "Option::is_none")] pub interest_rate: Option, #[serde(rename = "nextFundingTime", skip_serializing_if = "Option::is_none")] pub next_funding_time: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl MarkPriceResponse2Inner { #[must_use] pub fn new() -> MarkPriceResponse2Inner { MarkPriceResponse2Inner { symbol: None, mark_price: None, index_price: None, estimated_settle_price: None, last_funding_rate: None, interest_rate: None, next_funding_time: None, time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/modify_isolated_position_margin_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ModifyIsolatedPositionMarginResponse { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, } impl ModifyIsolatedPositionMarginResponse { #[must_use] pub fn new() -> ModifyIsolatedPositionMarginResponse { ModifyIsolatedPositionMarginResponse { amount: None, code: None, msg: None, r#type: None, } } } src/derivatives_trading_usds_futures/rest_api/models/modify_multiple_orders_batch_orders_parameter_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ModifyMultipleOrdersBatchOrdersParameterInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "priceMatch", skip_serializing_if = "Option::is_none")] pub price_match: Option, #[serde(rename = "recvWindow", skip_serializing_if = "Option::is_none")] pub recv_window: Option, } impl ModifyMultipleOrdersBatchOrdersParameterInner { #[must_use] pub fn new() -> ModifyMultipleOrdersBatchOrdersParameterInner { ModifyMultipleOrdersBatchOrdersParameterInner { order_id: None, orig_client_order_id: None, symbol: None, side: None, quantity: None, price: None, price_match: None, recv_window: None, } } } /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum SideEnum { #[serde(rename = "BUY")] Buy, #[serde(rename = "SELL")] Sell, } impl Default for SideEnum { fn default() -> SideEnum { Self::Buy } } /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PriceMatchEnum { #[serde(rename = "NONE")] None, #[serde(rename = "OPPONENT")] Opponent, #[serde(rename = "OPPONENT_5")] Opponent5, #[serde(rename = "OPPONENT_10")] Opponent10, #[serde(rename = "OPPONENT_20")] Opponent20, #[serde(rename = "QUEUE")] Queue, #[serde(rename = "QUEUE_5")] Queue5, #[serde(rename = "QUEUE_10")] Queue10, #[serde(rename = "QUEUE_20")] Queue20, } impl Default for PriceMatchEnum { fn default() -> PriceMatchEnum { Self::None } } src/derivatives_trading_usds_futures/rest_api/models/multi_assets_mode_asset_index_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum MultiAssetsModeAssetIndexResponse { MultiAssetsModeAssetIndexResponse1(Box), MultiAssetsModeAssetIndexResponse2(Vec), Other(serde_json::Value), } impl Default for MultiAssetsModeAssetIndexResponse { fn default() -> Self { Self::MultiAssetsModeAssetIndexResponse1(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/multi_assets_mode_asset_index_response1.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MultiAssetsModeAssetIndexResponse1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "index", skip_serializing_if = "Option::is_none")] pub index: Option, #[serde(rename = "bidBuffer", skip_serializing_if = "Option::is_none")] pub bid_buffer: Option, #[serde(rename = "askBuffer", skip_serializing_if = "Option::is_none")] pub ask_buffer: Option, #[serde(rename = "bidRate", skip_serializing_if = "Option::is_none")] pub bid_rate: Option, #[serde(rename = "askRate", skip_serializing_if = "Option::is_none")] pub ask_rate: Option, #[serde( rename = "autoExchangeBidBuffer", skip_serializing_if = "Option::is_none" )] pub auto_exchange_bid_buffer: Option, #[serde( rename = "autoExchangeAskBuffer", skip_serializing_if = "Option::is_none" )] pub auto_exchange_ask_buffer: Option, #[serde( rename = "autoExchangeBidRate", skip_serializing_if = "Option::is_none" )] pub auto_exchange_bid_rate: Option, #[serde( rename = "autoExchangeAskRate", skip_serializing_if = "Option::is_none" )] pub auto_exchange_ask_rate: Option, } impl MultiAssetsModeAssetIndexResponse1 { #[must_use] pub fn new() -> MultiAssetsModeAssetIndexResponse1 { MultiAssetsModeAssetIndexResponse1 { symbol: None, time: None, index: None, bid_buffer: None, ask_buffer: None, bid_rate: None, ask_rate: None, auto_exchange_bid_buffer: None, auto_exchange_ask_buffer: None, auto_exchange_bid_rate: None, auto_exchange_ask_rate: None, } } } src/derivatives_trading_usds_futures/rest_api/models/multi_assets_mode_asset_index_response2_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MultiAssetsModeAssetIndexResponse2Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "index", skip_serializing_if = "Option::is_none")] pub index: Option, #[serde(rename = "bidBuffer", skip_serializing_if = "Option::is_none")] pub bid_buffer: Option, #[serde(rename = "askBuffer", skip_serializing_if = "Option::is_none")] pub ask_buffer: Option, #[serde(rename = "bidRate", skip_serializing_if = "Option::is_none")] pub bid_rate: Option, #[serde(rename = "askRate", skip_serializing_if = "Option::is_none")] pub ask_rate: Option, #[serde( rename = "autoExchangeBidBuffer", skip_serializing_if = "Option::is_none" )] pub auto_exchange_bid_buffer: Option, #[serde( rename = "autoExchangeAskBuffer", skip_serializing_if = "Option::is_none" )] pub auto_exchange_ask_buffer: Option, #[serde( rename = "autoExchangeBidRate", skip_serializing_if = "Option::is_none" )] pub auto_exchange_bid_rate: Option, #[serde( rename = "autoExchangeAskRate", skip_serializing_if = "Option::is_none" )] pub auto_exchange_ask_rate: Option, } impl MultiAssetsModeAssetIndexResponse2Inner { #[must_use] pub fn new() -> MultiAssetsModeAssetIndexResponse2Inner { MultiAssetsModeAssetIndexResponse2Inner { symbol: None, time: None, index: None, bid_buffer: None, ask_buffer: None, bid_rate: None, ask_rate: None, auto_exchange_bid_buffer: None, auto_exchange_ask_buffer: None, auto_exchange_bid_rate: None, auto_exchange_ask_rate: None, } } } src/derivatives_trading_usds_futures/rest_api/models/notional_and_leverage_brackets_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum NotionalAndLeverageBracketsResponse { NotionalAndLeverageBracketsResponse1(Vec), NotionalAndLeverageBracketsResponse2(Box), Other(serde_json::Value), } impl Default for NotionalAndLeverageBracketsResponse { fn default() -> Self { Self::NotionalAndLeverageBracketsResponse1(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/notional_and_leverage_brackets_response1_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NotionalAndLeverageBracketsResponse1Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "notionalCoef", skip_serializing_if = "Option::is_none")] pub notional_coef: Option, #[serde(rename = "brackets", skip_serializing_if = "Option::is_none")] pub brackets: Option>, } impl NotionalAndLeverageBracketsResponse1Inner { #[must_use] pub fn new() -> NotionalAndLeverageBracketsResponse1Inner { NotionalAndLeverageBracketsResponse1Inner { symbol: None, notional_coef: None, brackets: None, } } } src/derivatives_trading_usds_futures/rest_api/models/notional_and_leverage_brackets_response1_inner_brackets_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NotionalAndLeverageBracketsResponse1InnerBracketsInner { #[serde(rename = "bracket", skip_serializing_if = "Option::is_none")] pub bracket: Option, #[serde(rename = "initialLeverage", skip_serializing_if = "Option::is_none")] pub initial_leverage: Option, #[serde(rename = "notionalCap", skip_serializing_if = "Option::is_none")] pub notional_cap: Option, #[serde(rename = "notionalFloor", skip_serializing_if = "Option::is_none")] pub notional_floor: Option, #[serde(rename = "maintMarginRatio", skip_serializing_if = "Option::is_none")] pub maint_margin_ratio: Option, #[serde(rename = "cum", skip_serializing_if = "Option::is_none")] pub cum: Option, } impl NotionalAndLeverageBracketsResponse1InnerBracketsInner { #[must_use] pub fn new() -> NotionalAndLeverageBracketsResponse1InnerBracketsInner { NotionalAndLeverageBracketsResponse1InnerBracketsInner { bracket: None, initial_leverage: None, notional_cap: None, notional_floor: None, maint_margin_ratio: None, cum: None, } } } src/derivatives_trading_usds_futures/rest_api/models/notional_and_leverage_brackets_response2.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NotionalAndLeverageBracketsResponse2 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "notionalCoef", skip_serializing_if = "Option::is_none")] pub notional_coef: Option, #[serde(rename = "brackets", skip_serializing_if = "Option::is_none")] pub brackets: Option>, } impl NotionalAndLeverageBracketsResponse2 { #[must_use] pub fn new() -> NotionalAndLeverageBracketsResponse2 { NotionalAndLeverageBracketsResponse2 { symbol: None, notional_coef: None, brackets: None, } } } src/derivatives_trading_usds_futures/rest_api/models/notional_and_leverage_brackets_response2_brackets_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NotionalAndLeverageBracketsResponse2BracketsInner { #[serde(rename = "bracket", skip_serializing_if = "Option::is_none")] pub bracket: Option, #[serde(rename = "initialLeverage", skip_serializing_if = "Option::is_none")] pub initial_leverage: Option, #[serde(rename = "notionalCap", skip_serializing_if = "Option::is_none")] pub notional_cap: Option, #[serde(rename = "notionalFloor", skip_serializing_if = "Option::is_none")] pub notional_floor: Option, #[serde(rename = "maintMarginRatio", skip_serializing_if = "Option::is_none")] pub maint_margin_ratio: Option, #[serde(rename = "cum", skip_serializing_if = "Option::is_none")] pub cum: Option, } impl NotionalAndLeverageBracketsResponse2BracketsInner { #[must_use] pub fn new() -> NotionalAndLeverageBracketsResponse2BracketsInner { NotionalAndLeverageBracketsResponse2BracketsInner { bracket: None, initial_leverage: None, notional_cap: None, notional_floor: None, maint_margin_ratio: None, cum: None, } } } src/derivatives_trading_usds_futures/rest_api/models/old_trades_lookup_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OldTradesLookupResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyerMaker", skip_serializing_if = "Option::is_none")] pub is_buyer_maker: Option, } impl OldTradesLookupResponseInner { #[must_use] pub fn new() -> OldTradesLookupResponseInner { OldTradesLookupResponseInner { id: None, price: None, qty: None, quote_qty: None, time: None, is_buyer_maker: None, } } } src/derivatives_trading_usds_futures/rest_api/models/open_interest_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenInterestResponse { #[serde(rename = "openInterest", skip_serializing_if = "Option::is_none")] pub open_interest: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl OpenInterestResponse { #[must_use] pub fn new() -> OpenInterestResponse { OpenInterestResponse { open_interest: None, symbol: None, time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/open_interest_statistics_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenInterestStatisticsResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "sumOpenInterest", skip_serializing_if = "Option::is_none")] pub sum_open_interest: Option, #[serde( rename = "sumOpenInterestValue", skip_serializing_if = "Option::is_none" )] pub sum_open_interest_value: Option, #[serde( rename = "CMCCirculatingSupply", skip_serializing_if = "Option::is_none" )] pub cmc_circulating_supply: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl OpenInterestStatisticsResponseInner { #[must_use] pub fn new() -> OpenInterestStatisticsResponseInner { OpenInterestStatisticsResponseInner { symbol: None, sum_open_interest: None, sum_open_interest_value: None, cmc_circulating_supply: None, timestamp: None, } } } src/derivatives_trading_usds_futures/rest_api/models/order_book_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderBookResponse { #[serde(rename = "lastUpdateId", skip_serializing_if = "Option::is_none")] pub last_update_id: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "bids", skip_serializing_if = "Option::is_none")] pub bids: Option>>, #[serde(rename = "asks", skip_serializing_if = "Option::is_none")] pub asks: Option>>, } impl OrderBookResponse { #[must_use] pub fn new() -> OrderBookResponse { OrderBookResponse { last_update_id: None, e_uppercase: None, t_uppercase: None, bids: None, asks: None, } } } src/derivatives_trading_usds_futures/rest_api/models/order_status_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderStatusResponse { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderStatus", skip_serializing_if = "Option::is_none")] pub order_status: Option, #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")] pub from_asset: Option, #[serde(rename = "fromAmount", skip_serializing_if = "Option::is_none")] pub from_amount: Option, #[serde(rename = "toAsset", skip_serializing_if = "Option::is_none")] pub to_asset: Option, #[serde(rename = "toAmount", skip_serializing_if = "Option::is_none")] pub to_amount: Option, #[serde(rename = "ratio", skip_serializing_if = "Option::is_none")] pub ratio: Option, #[serde(rename = "inverseRatio", skip_serializing_if = "Option::is_none")] pub inverse_ratio: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, } impl OrderStatusResponse { #[must_use] pub fn new() -> OrderStatusResponse { OrderStatusResponse { order_id: None, order_status: None, from_asset: None, from_amount: None, to_asset: None, to_amount: None, ratio: None, inverse_ratio: None, create_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/position_adl_quantile_estimation_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionAdlQuantileEstimationResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "adlQuantile", skip_serializing_if = "Option::is_none")] pub adl_quantile: Option>, } impl PositionAdlQuantileEstimationResponseInner { #[must_use] pub fn new() -> PositionAdlQuantileEstimationResponseInner { PositionAdlQuantileEstimationResponseInner { symbol: None, adl_quantile: None, } } } src/derivatives_trading_usds_futures/rest_api/models/position_adl_quantile_estimation_response_inner_adl_quantile.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionAdlQuantileEstimationResponseInnerAdlQuantile { #[serde(rename = "LONG", skip_serializing_if = "Option::is_none")] pub long: Option, #[serde(rename = "SHORT", skip_serializing_if = "Option::is_none")] pub short: Option, #[serde(rename = "HEDGE", skip_serializing_if = "Option::is_none")] pub hedge: Option, #[serde(rename = "BOTH", skip_serializing_if = "Option::is_none")] pub both: Option, } impl PositionAdlQuantileEstimationResponseInnerAdlQuantile { #[must_use] pub fn new() -> PositionAdlQuantileEstimationResponseInnerAdlQuantile { PositionAdlQuantileEstimationResponseInnerAdlQuantile { long: None, short: None, hedge: None, both: None, } } } src/derivatives_trading_usds_futures/rest_api/models/position_information_v2_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionInformationV2ResponseInner { #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "breakEvenPrice", skip_serializing_if = "Option::is_none")] pub break_even_price: Option, #[serde(rename = "marginType", skip_serializing_if = "Option::is_none")] pub margin_type: Option, #[serde(rename = "isAutoAddMargin", skip_serializing_if = "Option::is_none")] pub is_auto_add_margin: Option, #[serde(rename = "isolatedMargin", skip_serializing_if = "Option::is_none")] pub isolated_margin: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "liquidationPrice", skip_serializing_if = "Option::is_none")] pub liquidation_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "maxNotionalValue", skip_serializing_if = "Option::is_none")] pub max_notional_value: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "notional", skip_serializing_if = "Option::is_none")] pub notional: Option, #[serde(rename = "isolatedWallet", skip_serializing_if = "Option::is_none")] pub isolated_wallet: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "unRealizedProfit", skip_serializing_if = "Option::is_none")] pub un_realized_profit: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl PositionInformationV2ResponseInner { #[must_use] pub fn new() -> PositionInformationV2ResponseInner { PositionInformationV2ResponseInner { entry_price: None, break_even_price: None, margin_type: None, is_auto_add_margin: None, isolated_margin: None, leverage: None, liquidation_price: None, mark_price: None, max_notional_value: None, position_amt: None, notional: None, isolated_wallet: None, symbol: None, un_realized_profit: None, position_side: None, update_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/position_information_v3_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionInformationV3ResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "breakEvenPrice", skip_serializing_if = "Option::is_none")] pub break_even_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "unRealizedProfit", skip_serializing_if = "Option::is_none")] pub un_realized_profit: Option, #[serde(rename = "liquidationPrice", skip_serializing_if = "Option::is_none")] pub liquidation_price: Option, #[serde(rename = "isolatedMargin", skip_serializing_if = "Option::is_none")] pub isolated_margin: Option, #[serde(rename = "notional", skip_serializing_if = "Option::is_none")] pub notional: Option, #[serde(rename = "marginAsset", skip_serializing_if = "Option::is_none")] pub margin_asset: Option, #[serde(rename = "isolatedWallet", skip_serializing_if = "Option::is_none")] pub isolated_wallet: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "adl", skip_serializing_if = "Option::is_none")] pub adl: Option, #[serde(rename = "bidNotional", skip_serializing_if = "Option::is_none")] pub bid_notional: Option, #[serde(rename = "askNotional", skip_serializing_if = "Option::is_none")] pub ask_notional: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl PositionInformationV3ResponseInner { #[must_use] pub fn new() -> PositionInformationV3ResponseInner { PositionInformationV3ResponseInner { symbol: None, position_side: None, position_amt: None, entry_price: None, break_even_price: None, mark_price: None, un_realized_profit: None, liquidation_price: None, isolated_margin: None, notional: None, margin_asset: None, isolated_wallet: None, initial_margin: None, maint_margin: None, position_initial_margin: None, open_order_initial_margin: None, adl: None, bid_notional: None, ask_notional: None, update_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/premium_index_kline_data_response_item_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum PremiumIndexKlineDataResponseItemInner { Integer(i64), String(String), Other(serde_json::Value), } impl Default for PremiumIndexKlineDataResponseItemInner { fn default() -> Self { Self::Integer(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/quarterly_contract_settlement_price_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuarterlyContractSettlementPriceResponseInner { #[serde(rename = "deliveryTime", skip_serializing_if = "Option::is_none")] pub delivery_time: Option, #[serde(rename = "deliveryPrice", skip_serializing_if = "Option::is_none")] pub delivery_price: Option, } impl QuarterlyContractSettlementPriceResponseInner { #[must_use] pub fn new() -> QuarterlyContractSettlementPriceResponseInner { QuarterlyContractSettlementPriceResponseInner { delivery_time: None, delivery_price: None, } } } src/derivatives_trading_usds_futures/rest_api/models/query_index_price_constituents_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIndexPriceConstituentsResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "constituents", skip_serializing_if = "Option::is_none")] pub constituents: Option>, } impl QueryIndexPriceConstituentsResponse { #[must_use] pub fn new() -> QueryIndexPriceConstituentsResponse { QueryIndexPriceConstituentsResponse { symbol: None, time: None, constituents: None, } } } src/derivatives_trading_usds_futures/rest_api/models/query_index_price_constituents_response_constituents_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIndexPriceConstituentsResponseConstituentsInner { #[serde(rename = "exchange", skip_serializing_if = "Option::is_none")] pub exchange: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "weight", skip_serializing_if = "Option::is_none")] pub weight: Option, } impl QueryIndexPriceConstituentsResponseConstituentsInner { #[must_use] pub fn new() -> QueryIndexPriceConstituentsResponseConstituentsInner { QueryIndexPriceConstituentsResponseConstituentsInner { exchange: None, symbol: None, price: None, weight: None, } } } src/derivatives_trading_usds_futures/rest_api/models/query_insurance_fund_balance_snapshot_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum QueryInsuranceFundBalanceSnapshotResponse { QueryInsuranceFundBalanceSnapshotResponse1( Box, ), QueryInsuranceFundBalanceSnapshotResponse2( Vec, ), Other(serde_json::Value), } impl Default for QueryInsuranceFundBalanceSnapshotResponse { fn default() -> Self { Self::QueryInsuranceFundBalanceSnapshotResponse1(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/query_insurance_fund_balance_snapshot_response1.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryInsuranceFundBalanceSnapshotResponse1 { #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")] pub symbols: Option>, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, } impl QueryInsuranceFundBalanceSnapshotResponse1 { #[must_use] pub fn new() -> QueryInsuranceFundBalanceSnapshotResponse1 { QueryInsuranceFundBalanceSnapshotResponse1 { symbols: None, assets: None, } } } src/derivatives_trading_usds_futures/rest_api/models/query_insurance_fund_balance_snapshot_response1_assets_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryInsuranceFundBalanceSnapshotResponse1AssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryInsuranceFundBalanceSnapshotResponse1AssetsInner { #[must_use] pub fn new() -> QueryInsuranceFundBalanceSnapshotResponse1AssetsInner { QueryInsuranceFundBalanceSnapshotResponse1AssetsInner { asset: None, margin_balance: None, update_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/query_insurance_fund_balance_snapshot_response2_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryInsuranceFundBalanceSnapshotResponse2Inner { #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")] pub symbols: Option>, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, } impl QueryInsuranceFundBalanceSnapshotResponse2Inner { #[must_use] pub fn new() -> QueryInsuranceFundBalanceSnapshotResponse2Inner { QueryInsuranceFundBalanceSnapshotResponse2Inner { symbols: None, assets: None, } } } src/derivatives_trading_usds_futures/rest_api/models/query_insurance_fund_balance_snapshot_response2_inner_assets_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryInsuranceFundBalanceSnapshotResponse2InnerAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryInsuranceFundBalanceSnapshotResponse2InnerAssetsInner { #[must_use] pub fn new() -> QueryInsuranceFundBalanceSnapshotResponse2InnerAssetsInner { QueryInsuranceFundBalanceSnapshotResponse2InnerAssetsInner { asset: None, margin_balance: None, update_time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/query_user_rate_limit_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUserRateLimitResponseInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, } impl QueryUserRateLimitResponseInner { #[must_use] pub fn new() -> QueryUserRateLimitResponseInner { QueryUserRateLimitResponseInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, } } } src/derivatives_trading_usds_futures/rest_api/models/recent_trades_list_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RecentTradesListResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyerMaker", skip_serializing_if = "Option::is_none")] pub is_buyer_maker: Option, } impl RecentTradesListResponseInner { #[must_use] pub fn new() -> RecentTradesListResponseInner { RecentTradesListResponseInner { id: None, price: None, qty: None, quote_qty: None, time: None, is_buyer_maker: None, } } } src/derivatives_trading_usds_futures/rest_api/models/send_quote_request_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SendQuoteRequestResponse { #[serde(rename = "quoteId", skip_serializing_if = "Option::is_none")] pub quote_id: Option, #[serde(rename = "ratio", skip_serializing_if = "Option::is_none")] pub ratio: Option, #[serde(rename = "inverseRatio", skip_serializing_if = "Option::is_none")] pub inverse_ratio: Option, #[serde(rename = "validTimestamp", skip_serializing_if = "Option::is_none")] pub valid_timestamp: Option, #[serde(rename = "toAmount", skip_serializing_if = "Option::is_none")] pub to_amount: Option, #[serde(rename = "fromAmount", skip_serializing_if = "Option::is_none")] pub from_amount: Option, } impl SendQuoteRequestResponse { #[must_use] pub fn new() -> SendQuoteRequestResponse { SendQuoteRequestResponse { quote_id: None, ratio: None, inverse_ratio: None, valid_timestamp: None, to_amount: None, from_amount: None, } } } src/derivatives_trading_usds_futures/rest_api/models/start_user_data_stream_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StartUserDataStreamResponse { #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl StartUserDataStreamResponse { #[must_use] pub fn new() -> StartUserDataStreamResponse { StartUserDataStreamResponse { listen_key: None } } } src/derivatives_trading_usds_futures/rest_api/models/symbol_configuration_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolConfigurationResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "marginType", skip_serializing_if = "Option::is_none")] pub margin_type: Option, #[serde(rename = "isAutoAddMargin", skip_serializing_if = "Option::is_none")] pub is_auto_add_margin: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "maxNotionalValue", skip_serializing_if = "Option::is_none")] pub max_notional_value: Option, } impl SymbolConfigurationResponseInner { #[must_use] pub fn new() -> SymbolConfigurationResponseInner { SymbolConfigurationResponseInner { symbol: None, margin_type: None, is_auto_add_margin: None, leverage: None, max_notional_value: None, } } } src/derivatives_trading_usds_futures/rest_api/models/symbol_order_book_ticker_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SymbolOrderBookTickerResponse { SymbolOrderBookTickerResponse1(Box), SymbolOrderBookTickerResponse2(Vec), Other(serde_json::Value), } impl Default for SymbolOrderBookTickerResponse { fn default() -> Self { Self::SymbolOrderBookTickerResponse1(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/symbol_order_book_ticker_response1.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolOrderBookTickerResponse1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "bidQty", skip_serializing_if = "Option::is_none")] pub bid_qty: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "askQty", skip_serializing_if = "Option::is_none")] pub ask_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl SymbolOrderBookTickerResponse1 { #[must_use] pub fn new() -> SymbolOrderBookTickerResponse1 { SymbolOrderBookTickerResponse1 { symbol: None, bid_price: None, bid_qty: None, ask_price: None, ask_qty: None, time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/symbol_order_book_ticker_response2_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolOrderBookTickerResponse2Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "bidQty", skip_serializing_if = "Option::is_none")] pub bid_qty: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "askQty", skip_serializing_if = "Option::is_none")] pub ask_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl SymbolOrderBookTickerResponse2Inner { #[must_use] pub fn new() -> SymbolOrderBookTickerResponse2Inner { SymbolOrderBookTickerResponse2Inner { symbol: None, bid_price: None, bid_qty: None, ask_price: None, ask_qty: None, time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/symbol_price_ticker_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SymbolPriceTickerResponse { SymbolPriceTickerResponse1(Box), SymbolPriceTickerResponse2(Vec), Other(serde_json::Value), } impl Default for SymbolPriceTickerResponse { fn default() -> Self { Self::SymbolPriceTickerResponse1(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/symbol_price_ticker_response1.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolPriceTickerResponse1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl SymbolPriceTickerResponse1 { #[must_use] pub fn new() -> SymbolPriceTickerResponse1 { SymbolPriceTickerResponse1 { symbol: None, price: None, time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/symbol_price_ticker_v2_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SymbolPriceTickerV2Response { SymbolPriceTickerV2Response1(Box), SymbolPriceTickerV2Response2(Vec), Other(serde_json::Value), } impl Default for SymbolPriceTickerV2Response { fn default() -> Self { Self::SymbolPriceTickerV2Response1(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/symbol_price_ticker_v2_response1.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolPriceTickerV2Response1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl SymbolPriceTickerV2Response1 { #[must_use] pub fn new() -> SymbolPriceTickerV2Response1 { SymbolPriceTickerV2Response1 { symbol: None, price: None, time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/symbol_price_ticker_v2_response2_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolPriceTickerV2Response2Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl SymbolPriceTickerV2Response2Inner { #[must_use] pub fn new() -> SymbolPriceTickerV2Response2Inner { SymbolPriceTickerV2Response2Inner { symbol: None, price: None, time: None, } } } src/derivatives_trading_usds_futures/rest_api/models/taker_buy_sell_volume_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TakerBuySellVolumeResponseInner { #[serde(rename = "buySellRatio", skip_serializing_if = "Option::is_none")] pub buy_sell_ratio: Option, #[serde(rename = "buyVol", skip_serializing_if = "Option::is_none")] pub buy_vol: Option, #[serde(rename = "sellVol", skip_serializing_if = "Option::is_none")] pub sell_vol: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl TakerBuySellVolumeResponseInner { #[must_use] pub fn new() -> TakerBuySellVolumeResponseInner { TakerBuySellVolumeResponseInner { buy_sell_ratio: None, buy_vol: None, sell_vol: None, timestamp: None, } } } src/derivatives_trading_usds_futures/rest_api/models/ticker24hr_price_change_statistics_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum Ticker24hrPriceChangeStatisticsResponse { Ticker24hrPriceChangeStatisticsResponse1(Box), Ticker24hrPriceChangeStatisticsResponse2( Vec, ), Other(serde_json::Value), } impl Default for Ticker24hrPriceChangeStatisticsResponse { fn default() -> Self { Self::Ticker24hrPriceChangeStatisticsResponse1(Default::default()) } } src/derivatives_trading_usds_futures/rest_api/models/ticker24hr_price_change_statistics_response1.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Ticker24hrPriceChangeStatisticsResponse1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "lastQty", skip_serializing_if = "Option::is_none")] pub last_qty: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl Ticker24hrPriceChangeStatisticsResponse1 { #[must_use] pub fn new() -> Ticker24hrPriceChangeStatisticsResponse1 { Ticker24hrPriceChangeStatisticsResponse1 { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, last_price: None, last_qty: None, open_price: None, high_price: None, low_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/derivatives_trading_usds_futures/rest_api/models/ticker24hr_price_change_statistics_response2_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Ticker24hrPriceChangeStatisticsResponse2Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "lastQty", skip_serializing_if = "Option::is_none")] pub last_qty: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl Ticker24hrPriceChangeStatisticsResponse2Inner { #[must_use] pub fn new() -> Ticker24hrPriceChangeStatisticsResponse2Inner { Ticker24hrPriceChangeStatisticsResponse2Inner { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, last_price: None, last_qty: None, open_price: None, high_price: None, low_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/derivatives_trading_usds_futures/rest_api/models/toggle_bnb_burn_on_futures_trade_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ToggleBnbBurnOnFuturesTradeResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl ToggleBnbBurnOnFuturesTradeResponse { #[must_use] pub fn new() -> ToggleBnbBurnOnFuturesTradeResponse { ToggleBnbBurnOnFuturesTradeResponse { code: None, msg: None, } } } src/derivatives_trading_usds_futures/rest_api/models/top_trader_long_short_ratio_accounts_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TopTraderLongShortRatioAccountsResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "longShortRatio", skip_serializing_if = "Option::is_none")] pub long_short_ratio: Option, #[serde(rename = "longAccount", skip_serializing_if = "Option::is_none")] pub long_account: Option, #[serde(rename = "shortAccount", skip_serializing_if = "Option::is_none")] pub short_account: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl TopTraderLongShortRatioAccountsResponseInner { #[must_use] pub fn new() -> TopTraderLongShortRatioAccountsResponseInner { TopTraderLongShortRatioAccountsResponseInner { symbol: None, long_short_ratio: None, long_account: None, short_account: None, timestamp: None, } } } src/derivatives_trading_usds_futures/rest_api/models/top_trader_long_short_ratio_positions_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TopTraderLongShortRatioPositionsResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "longShortRatio", skip_serializing_if = "Option::is_none")] pub long_short_ratio: Option, #[serde(rename = "longAccount", skip_serializing_if = "Option::is_none")] pub long_account: Option, #[serde(rename = "shortAccount", skip_serializing_if = "Option::is_none")] pub short_account: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl TopTraderLongShortRatioPositionsResponseInner { #[must_use] pub fn new() -> TopTraderLongShortRatioPositionsResponseInner { TopTraderLongShortRatioPositionsResponseInner { symbol: None, long_short_ratio: None, long_account: None, short_account: None, timestamp: None, } } } src/derivatives_trading_usds_futures/rest_api/models/user_commission_rate_response.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UserCommissionRateResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde( rename = "makerCommissionRate", skip_serializing_if = "Option::is_none" )] pub maker_commission_rate: Option, #[serde( rename = "takerCommissionRate", skip_serializing_if = "Option::is_none" )] pub taker_commission_rate: Option, } impl UserCommissionRateResponse { #[must_use] pub fn new() -> UserCommissionRateResponse { UserCommissionRateResponse { symbol: None, maker_commission_rate: None, taker_commission_rate: None, } } } src/derivatives_trading_usds_futures/rest_api/models/users_force_orders_response_inner.rs /* * Binance Derivatives Trading USDS Futures REST API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UsersForceOrdersResponseInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "cumQuote", skip_serializing_if = "Option::is_none")] pub cum_quote: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "reduceOnly", skip_serializing_if = "Option::is_none")] pub reduce_only: Option, #[serde(rename = "closePosition", skip_serializing_if = "Option::is_none")] pub close_position: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "workingType", skip_serializing_if = "Option::is_none")] pub working_type: Option, #[serde(rename = "origType", skip_serializing_if = "Option::is_none")] pub orig_type: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl UsersForceOrdersResponseInner { #[must_use] pub fn new() -> UsersForceOrdersResponseInner { UsersForceOrdersResponseInner { order_id: None, symbol: None, status: None, client_order_id: None, price: None, avg_price: None, orig_qty: None, executed_qty: None, cum_quote: None, time_in_force: None, r#type: None, reduce_only: None, close_position: None, side: None, position_side: None, stop_price: None, working_type: None, orig_type: None, time: None, update_time: None, } } } src/derivatives_trading_usds_futures/websocket_api/apis/mod.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod market_data_api; pub use market_data_api::*; pub mod trade_api; pub use trade_api::*; pub mod user_data_streams_api; pub use user_data_streams_api::*; src/derivatives_trading_usds_futures/websocket_api/handle.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ use crate::{common::config::ConfigurationWebsocketApi, models::WebsocketApiConnectConfig}; use super::WebsocketApi; #[derive(Clone)] pub struct WebsocketApiHandle { configuration: ConfigurationWebsocketApi, } impl WebsocketApiHandle { pub fn new(configuration: ConfigurationWebsocketApi) -> Self { Self { configuration } } /// Connects to the WebSocket API using default configuration. /// /// # Returns /// /// A `Result` containing the connected `WebsocketApi` instance if successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// pub async fn connect(&self) -> anyhow::Result { self.connect_with_config(Default::default()).await } /// Connects to the WebSocket API with a custom configuration. /// /// # Arguments /// /// * `cfg` - A configuration object specifying connection parameters. /// /// # Returns /// /// A `Result` containing the connected `WebsocketApi` instance if successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// pub async fn connect_with_config( &self, cfg: WebsocketApiConnectConfig, ) -> anyhow::Result { WebsocketApi::connect(self.configuration.clone(), cfg.mode).await } } src/derivatives_trading_usds_futures/websocket_api/models/account_information_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl AccountInformationResponse { #[must_use] pub fn new() -> AccountInformationResponse { AccountInformationResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/account_information_response_result_assets_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponseResultAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "marginAvailable", skip_serializing_if = "Option::is_none")] pub margin_available: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountInformationResponseResultAssetsInner { #[must_use] pub fn new() -> AccountInformationResponseResultAssetsInner { AccountInformationResponseResultAssetsInner { asset: None, wallet_balance: None, unrealized_profit: None, margin_balance: None, maint_margin: None, initial_margin: None, position_initial_margin: None, open_order_initial_margin: None, cross_wallet_balance: None, cross_un_pnl: None, available_balance: None, max_withdraw_amount: None, margin_available: None, update_time: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/account_information_response_result_positions_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationResponseResultPositionsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "isolated", skip_serializing_if = "Option::is_none")] pub isolated: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "maxNotional", skip_serializing_if = "Option::is_none")] pub max_notional: Option, #[serde(rename = "bidNotional", skip_serializing_if = "Option::is_none")] pub bid_notional: Option, #[serde(rename = "askNotional", skip_serializing_if = "Option::is_none")] pub ask_notional: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "breakEvenPrice", skip_serializing_if = "Option::is_none")] pub break_even_price: Option, } impl AccountInformationResponseResultPositionsInner { #[must_use] pub fn new() -> AccountInformationResponseResultPositionsInner { AccountInformationResponseResultPositionsInner { symbol: None, initial_margin: None, maint_margin: None, unrealized_profit: None, position_initial_margin: None, open_order_initial_margin: None, leverage: None, isolated: None, entry_price: None, max_notional: None, bid_notional: None, ask_notional: None, position_side: None, position_amt: None, update_time: None, break_even_price: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/account_information_v2_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationV2Response { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl AccountInformationV2Response { #[must_use] pub fn new() -> AccountInformationV2Response { AccountInformationV2Response { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/account_information_v2_response_rate_limits_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationV2ResponseRateLimitsInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl AccountInformationV2ResponseRateLimitsInner { #[must_use] pub fn new() -> AccountInformationV2ResponseRateLimitsInner { AccountInformationV2ResponseRateLimitsInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/account_information_v2_response_result.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationV2ResponseResult { #[serde(rename = "totalInitialMargin", skip_serializing_if = "Option::is_none")] pub total_initial_margin: Option, #[serde(rename = "totalMaintMargin", skip_serializing_if = "Option::is_none")] pub total_maint_margin: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde( rename = "totalUnrealizedProfit", skip_serializing_if = "Option::is_none" )] pub total_unrealized_profit: Option, #[serde(rename = "totalMarginBalance", skip_serializing_if = "Option::is_none")] pub total_margin_balance: Option, #[serde( rename = "totalPositionInitialMargin", skip_serializing_if = "Option::is_none" )] pub total_position_initial_margin: Option, #[serde( rename = "totalOpenOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub total_open_order_initial_margin: Option, #[serde( rename = "totalCrossWalletBalance", skip_serializing_if = "Option::is_none" )] pub total_cross_wallet_balance: Option, #[serde(rename = "totalCrossUnPnl", skip_serializing_if = "Option::is_none")] pub total_cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "positions", skip_serializing_if = "Option::is_none")] pub positions: Option>, } impl AccountInformationV2ResponseResult { #[must_use] pub fn new() -> AccountInformationV2ResponseResult { AccountInformationV2ResponseResult { total_initial_margin: None, total_maint_margin: None, total_wallet_balance: None, total_unrealized_profit: None, total_margin_balance: None, total_position_initial_margin: None, total_open_order_initial_margin: None, total_cross_wallet_balance: None, total_cross_un_pnl: None, available_balance: None, max_withdraw_amount: None, assets: None, positions: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/account_information_v2_response_result_assets_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationV2ResponseResultAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "marginAvailable", skip_serializing_if = "Option::is_none")] pub margin_available: Option, } impl AccountInformationV2ResponseResultAssetsInner { #[must_use] pub fn new() -> AccountInformationV2ResponseResultAssetsInner { AccountInformationV2ResponseResultAssetsInner { asset: None, wallet_balance: None, unrealized_profit: None, margin_balance: None, maint_margin: None, initial_margin: None, position_initial_margin: None, open_order_initial_margin: None, cross_wallet_balance: None, cross_un_pnl: None, available_balance: None, max_withdraw_amount: None, update_time: None, margin_available: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/account_information_v2_response_result_positions_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInformationV2ResponseResultPositionsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "isolatedMargin", skip_serializing_if = "Option::is_none")] pub isolated_margin: Option, #[serde(rename = "notional", skip_serializing_if = "Option::is_none")] pub notional: Option, #[serde(rename = "isolatedWallet", skip_serializing_if = "Option::is_none")] pub isolated_wallet: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountInformationV2ResponseResultPositionsInner { #[must_use] pub fn new() -> AccountInformationV2ResponseResultPositionsInner { AccountInformationV2ResponseResultPositionsInner { symbol: None, position_side: None, position_amt: None, unrealized_profit: None, isolated_margin: None, notional: None, isolated_wallet: None, initial_margin: None, maint_margin: None, update_time: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/cancel_algo_order_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAlgoOrderResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl CancelAlgoOrderResponse { #[must_use] pub fn new() -> CancelAlgoOrderResponse { CancelAlgoOrderResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/cancel_algo_order_response_rate_limits_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelAlgoOrderResponseRateLimitsInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl CancelAlgoOrderResponseRateLimitsInner { #[must_use] pub fn new() -> CancelAlgoOrderResponseRateLimitsInner { CancelAlgoOrderResponseRateLimitsInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/cancel_order_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelOrderResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl CancelOrderResponse { #[must_use] pub fn new() -> CancelOrderResponse { CancelOrderResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/close_user_data_stream_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CloseUserDataStreamResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl CloseUserDataStreamResponse { #[must_use] pub fn new() -> CloseUserDataStreamResponse { CloseUserDataStreamResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/futures_account_balance_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesAccountBalanceResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl FuturesAccountBalanceResponse { #[must_use] pub fn new() -> FuturesAccountBalanceResponse { FuturesAccountBalanceResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/futures_account_balance_v2_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesAccountBalanceV2Response { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl FuturesAccountBalanceV2Response { #[must_use] pub fn new() -> FuturesAccountBalanceV2Response { FuturesAccountBalanceV2Response { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/futures_account_balance_v2_response_result_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesAccountBalanceV2ResponseResultInner { #[serde(rename = "accountAlias", skip_serializing_if = "Option::is_none")] pub account_alias: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "balance", skip_serializing_if = "Option::is_none")] pub balance: Option, #[serde(rename = "crossWalletBalance", skip_serializing_if = "Option::is_none")] pub cross_wallet_balance: Option, #[serde(rename = "crossUnPnl", skip_serializing_if = "Option::is_none")] pub cross_un_pnl: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "marginAvailable", skip_serializing_if = "Option::is_none")] pub margin_available: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl FuturesAccountBalanceV2ResponseResultInner { #[must_use] pub fn new() -> FuturesAccountBalanceV2ResponseResultInner { FuturesAccountBalanceV2ResponseResultInner { account_alias: None, asset: None, balance: None, cross_wallet_balance: None, cross_un_pnl: None, available_balance: None, max_withdraw_amount: None, margin_available: None, update_time: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/keepalive_user_data_stream_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KeepaliveUserDataStreamResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl KeepaliveUserDataStreamResponse { #[must_use] pub fn new() -> KeepaliveUserDataStreamResponse { KeepaliveUserDataStreamResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/keepalive_user_data_stream_response_result.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KeepaliveUserDataStreamResponseResult { #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl KeepaliveUserDataStreamResponseResult { #[must_use] pub fn new() -> KeepaliveUserDataStreamResponseResult { KeepaliveUserDataStreamResponseResult { listen_key: None } } } src/derivatives_trading_usds_futures/websocket_api/models/modify_order_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ModifyOrderResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl ModifyOrderResponse { #[must_use] pub fn new() -> ModifyOrderResponse { ModifyOrderResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/modify_order_response_rate_limits_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ModifyOrderResponseRateLimitsInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl ModifyOrderResponseRateLimitsInner { #[must_use] pub fn new() -> ModifyOrderResponseRateLimitsInner { ModifyOrderResponseRateLimitsInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/new_algo_order_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewAlgoOrderResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl NewAlgoOrderResponse { #[must_use] pub fn new() -> NewAlgoOrderResponse { NewAlgoOrderResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/new_order_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewOrderResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl NewOrderResponse { #[must_use] pub fn new() -> NewOrderResponse { NewOrderResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/order_book_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderBookResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderBookResponse { #[must_use] pub fn new() -> OrderBookResponse { OrderBookResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/order_book_response_rate_limits_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderBookResponseRateLimitsInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl OrderBookResponseRateLimitsInner { #[must_use] pub fn new() -> OrderBookResponseRateLimitsInner { OrderBookResponseRateLimitsInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/order_book_response_result.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderBookResponseResult { #[serde(rename = "lastUpdateId", skip_serializing_if = "Option::is_none")] pub last_update_id: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "bids", skip_serializing_if = "Option::is_none")] pub bids: Option>>, #[serde(rename = "asks", skip_serializing_if = "Option::is_none")] pub asks: Option>>, } impl OrderBookResponseResult { #[must_use] pub fn new() -> OrderBookResponseResult { OrderBookResponseResult { last_update_id: None, e_uppercase: None, t_uppercase: None, bids: None, asks: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/position_information_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionInformationResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl PositionInformationResponse { #[must_use] pub fn new() -> PositionInformationResponse { PositionInformationResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/position_information_response_result_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionInformationResponseResultInner { #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "breakEvenPrice", skip_serializing_if = "Option::is_none")] pub break_even_price: Option, #[serde(rename = "marginType", skip_serializing_if = "Option::is_none")] pub margin_type: Option, #[serde(rename = "isAutoAddMargin", skip_serializing_if = "Option::is_none")] pub is_auto_add_margin: Option, #[serde(rename = "isolatedMargin", skip_serializing_if = "Option::is_none")] pub isolated_margin: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "liquidationPrice", skip_serializing_if = "Option::is_none")] pub liquidation_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "maxNotionalValue", skip_serializing_if = "Option::is_none")] pub max_notional_value: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "notional", skip_serializing_if = "Option::is_none")] pub notional: Option, #[serde(rename = "isolatedWallet", skip_serializing_if = "Option::is_none")] pub isolated_wallet: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "unRealizedProfit", skip_serializing_if = "Option::is_none")] pub un_realized_profit: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl PositionInformationResponseResultInner { #[must_use] pub fn new() -> PositionInformationResponseResultInner { PositionInformationResponseResultInner { entry_price: None, break_even_price: None, margin_type: None, is_auto_add_margin: None, isolated_margin: None, leverage: None, liquidation_price: None, mark_price: None, max_notional_value: None, position_amt: None, notional: None, isolated_wallet: None, symbol: None, un_realized_profit: None, position_side: None, update_time: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/position_information_v2_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionInformationV2Response { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl PositionInformationV2Response { #[must_use] pub fn new() -> PositionInformationV2Response { PositionInformationV2Response { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/position_information_v2_response_result_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PositionInformationV2ResponseResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "breakEvenPrice", skip_serializing_if = "Option::is_none")] pub break_even_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "liquidationPrice", skip_serializing_if = "Option::is_none")] pub liquidation_price: Option, #[serde(rename = "isolatedMargin", skip_serializing_if = "Option::is_none")] pub isolated_margin: Option, #[serde(rename = "notional", skip_serializing_if = "Option::is_none")] pub notional: Option, #[serde(rename = "marginAsset", skip_serializing_if = "Option::is_none")] pub margin_asset: Option, #[serde(rename = "isolatedWallet", skip_serializing_if = "Option::is_none")] pub isolated_wallet: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintMargin", skip_serializing_if = "Option::is_none")] pub maint_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde(rename = "adl", skip_serializing_if = "Option::is_none")] pub adl: Option, #[serde(rename = "bidNotional", skip_serializing_if = "Option::is_none")] pub bid_notional: Option, #[serde(rename = "askNotional", skip_serializing_if = "Option::is_none")] pub ask_notional: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl PositionInformationV2ResponseResultInner { #[must_use] pub fn new() -> PositionInformationV2ResponseResultInner { PositionInformationV2ResponseResultInner { symbol: None, position_side: None, position_amt: None, entry_price: None, break_even_price: None, mark_price: None, unrealized_profit: None, liquidation_price: None, isolated_margin: None, notional: None, margin_asset: None, isolated_wallet: None, initial_margin: None, maint_margin: None, position_initial_margin: None, open_order_initial_margin: None, adl: None, bid_notional: None, ask_notional: None, update_time: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/query_order_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryOrderResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, } impl QueryOrderResponse { #[must_use] pub fn new() -> QueryOrderResponse { QueryOrderResponse { id: None, status: None, result: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/start_user_data_stream_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StartUserDataStreamResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl StartUserDataStreamResponse { #[must_use] pub fn new() -> StartUserDataStreamResponse { StartUserDataStreamResponse { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/start_user_data_stream_response_result.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StartUserDataStreamResponseResult { #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl StartUserDataStreamResponseResult { #[must_use] pub fn new() -> StartUserDataStreamResponseResult { StartUserDataStreamResponseResult { listen_key: None } } } src/derivatives_trading_usds_futures/websocket_api/models/symbol_order_book_ticker_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SymbolOrderBookTickerResponse { SymbolOrderBookTickerResponse1(Box), SymbolOrderBookTickerResponse2(Box), Other(serde_json::Value), } impl Default for SymbolOrderBookTickerResponse { fn default() -> Self { Self::SymbolOrderBookTickerResponse1(Default::default()) } } src/derivatives_trading_usds_futures/websocket_api/models/symbol_order_book_ticker_response1.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolOrderBookTickerResponse1 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl SymbolOrderBookTickerResponse1 { #[must_use] pub fn new() -> SymbolOrderBookTickerResponse1 { SymbolOrderBookTickerResponse1 { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/symbol_order_book_ticker_response1_rate_limits_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolOrderBookTickerResponse1RateLimitsInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl SymbolOrderBookTickerResponse1RateLimitsInner { #[must_use] pub fn new() -> SymbolOrderBookTickerResponse1RateLimitsInner { SymbolOrderBookTickerResponse1RateLimitsInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/symbol_order_book_ticker_response1_result.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolOrderBookTickerResponse1Result { #[serde(rename = "lastUpdateId", skip_serializing_if = "Option::is_none")] pub last_update_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "bidQty", skip_serializing_if = "Option::is_none")] pub bid_qty: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "askQty", skip_serializing_if = "Option::is_none")] pub ask_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl SymbolOrderBookTickerResponse1Result { #[must_use] pub fn new() -> SymbolOrderBookTickerResponse1Result { SymbolOrderBookTickerResponse1Result { last_update_id: None, symbol: None, bid_price: None, bid_qty: None, ask_price: None, ask_qty: None, time: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/symbol_order_book_ticker_response2.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolOrderBookTickerResponse2 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl SymbolOrderBookTickerResponse2 { #[must_use] pub fn new() -> SymbolOrderBookTickerResponse2 { SymbolOrderBookTickerResponse2 { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/symbol_price_ticker_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum SymbolPriceTickerResponse { SymbolPriceTickerResponse1(Box), SymbolPriceTickerResponse2(Box), Other(serde_json::Value), } impl Default for SymbolPriceTickerResponse { fn default() -> Self { Self::SymbolPriceTickerResponse1(Default::default()) } } src/derivatives_trading_usds_futures/websocket_api/models/symbol_price_ticker_response1.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolPriceTickerResponse1 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl SymbolPriceTickerResponse1 { #[must_use] pub fn new() -> SymbolPriceTickerResponse1 { SymbolPriceTickerResponse1 { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/symbol_price_ticker_response1_result.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolPriceTickerResponse1Result { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl SymbolPriceTickerResponse1Result { #[must_use] pub fn new() -> SymbolPriceTickerResponse1Result { SymbolPriceTickerResponse1Result { symbol: None, price: None, time: None, } } } src/derivatives_trading_usds_futures/websocket_api/models/symbol_price_ticker_response2.rs /* * Binance Derivatives Trading USDS Futures WebSocket API * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SymbolPriceTickerResponse2 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl SymbolPriceTickerResponse2 { #[must_use] pub fn new() -> SymbolPriceTickerResponse2 { SymbolPriceTickerResponse2 { id: None, status: None, result: None, rate_limits: None, } } } src/derivatives_trading_usds_futures/websocket_streams/apis/mod.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod websocket_market_streams_api; pub use websocket_market_streams_api::*; src/derivatives_trading_usds_futures/websocket_streams/handle.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ use crate::{common::config::ConfigurationWebsocketStreams, models::WebsocketStreamsConnectConfig}; use super::WebsocketStreams; #[derive(Clone)] pub struct WebsocketStreamsHandle { configuration: ConfigurationWebsocketStreams, } impl WebsocketStreamsHandle { #[must_use] pub fn new(configuration: ConfigurationWebsocketStreams) -> Self { Self { configuration } } /// Connects to a WebSocket stream using default configuration. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let streams = handle.connect().await?; /// pub async fn connect(&self) -> anyhow::Result { self.connect_with_config(Default::default()).await } /// Connects to a WebSocket stream with a custom configuration. /// /// # Arguments /// /// * `cfg` - A configuration object specifying connection details for the WebSocket stream. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let `custom_config` = `WebsocketStreamsConnectConfig::default()`; /// let streams = `handle.connect_with_config(custom_config).await`?; /// pub async fn connect_with_config( &self, cfg: WebsocketStreamsConnectConfig, ) -> anyhow::Result { WebsocketStreams::connect(self.configuration.clone(), cfg.streams, cfg.mode).await } } src/derivatives_trading_usds_futures/websocket_streams/models/account_config_update.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountConfigUpdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "ac", skip_serializing_if = "Option::is_none")] pub ac: Option>, #[serde(rename = "ai", skip_serializing_if = "Option::is_none")] pub ai: Option>, } impl AccountConfigUpdate { #[must_use] pub fn new() -> AccountConfigUpdate { AccountConfigUpdate { e_uppercase: None, t_uppercase: None, ac: None, ai: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/account_config_update_ac.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountConfigUpdateAc { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, } impl AccountConfigUpdateAc { #[must_use] pub fn new() -> AccountConfigUpdateAc { AccountConfigUpdateAc { s: None, l: None } } } src/derivatives_trading_usds_futures/websocket_streams/models/account_config_update_ai.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountConfigUpdateAi { #[serde(rename = "j", skip_serializing_if = "Option::is_none")] pub j: Option, } impl AccountConfigUpdateAi { #[must_use] pub fn new() -> AccountConfigUpdateAi { AccountConfigUpdateAi { j: None } } } src/derivatives_trading_usds_futures/websocket_streams/models/account_update.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option>, } impl AccountUpdate { #[must_use] pub fn new() -> AccountUpdate { AccountUpdate { e_uppercase: None, t_uppercase: None, a: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/account_update_a.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateA { #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option>, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option>, } impl AccountUpdateA { #[must_use] pub fn new() -> AccountUpdateA { AccountUpdateA { m: None, b_uppercase: None, p_uppercase: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/account_update_a_b_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateABInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "wb", skip_serializing_if = "Option::is_none")] pub wb: Option, #[serde(rename = "cw", skip_serializing_if = "Option::is_none")] pub cw: Option, #[serde(rename = "bc", skip_serializing_if = "Option::is_none")] pub bc: Option, } impl AccountUpdateABInner { #[must_use] pub fn new() -> AccountUpdateABInner { AccountUpdateABInner { a: None, wb: None, cw: None, bc: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/account_update_a_p_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountUpdateAPInner { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "pa", skip_serializing_if = "Option::is_none")] pub pa: Option, #[serde(rename = "ep", skip_serializing_if = "Option::is_none")] pub ep: Option, #[serde(rename = "bep", skip_serializing_if = "Option::is_none")] pub bep: Option, #[serde(rename = "cr", skip_serializing_if = "Option::is_none")] pub cr: Option, #[serde(rename = "up", skip_serializing_if = "Option::is_none")] pub up: Option, #[serde(rename = "mt", skip_serializing_if = "Option::is_none")] pub mt: Option, #[serde(rename = "iw", skip_serializing_if = "Option::is_none")] pub iw: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, } impl AccountUpdateAPInner { #[must_use] pub fn new() -> AccountUpdateAPInner { AccountUpdateAPInner { s: None, pa: None, ep: None, bep: None, cr: None, up: None, mt: None, iw: None, ps: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/aggregate_trade_streams_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AggregateTradeStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, } impl AggregateTradeStreamsResponse { #[must_use] pub fn new() -> AggregateTradeStreamsResponse { AggregateTradeStreamsResponse { e: None, e_uppercase: None, s: None, a: None, p: None, q: None, f: None, l: None, t_uppercase: None, m: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/algo_update.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AlgoUpdate { #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option>, } impl AlgoUpdate { #[must_use] pub fn new() -> AlgoUpdate { AlgoUpdate { t_uppercase: None, e_uppercase: None, o: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/algo_update_o.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AlgoUpdateO { #[serde(rename = "caid", skip_serializing_if = "Option::is_none")] pub caid: Option, #[serde(rename = "aid", skip_serializing_if = "Option::is_none")] pub aid: Option, #[serde(rename = "at", skip_serializing_if = "Option::is_none")] pub at: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "S", skip_serializing_if = "Option::is_none")] pub s_uppercase: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "X", skip_serializing_if = "Option::is_none")] pub x_uppercase: Option, #[serde(rename = "ai", skip_serializing_if = "Option::is_none")] pub ai: Option, #[serde(rename = "ap", skip_serializing_if = "Option::is_none")] pub ap: Option, #[serde(rename = "aq", skip_serializing_if = "Option::is_none")] pub aq: Option, #[serde(rename = "act", skip_serializing_if = "Option::is_none")] pub act: Option, #[serde(rename = "tp", skip_serializing_if = "Option::is_none")] pub tp: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "V", skip_serializing_if = "Option::is_none")] pub v_uppercase: Option, #[serde(rename = "wt", skip_serializing_if = "Option::is_none")] pub wt: Option, #[serde(rename = "pm", skip_serializing_if = "Option::is_none")] pub pm: Option, #[serde(rename = "cp", skip_serializing_if = "Option::is_none")] pub cp: Option, #[serde(rename = "pP", skip_serializing_if = "Option::is_none")] pub p_p: Option, #[serde(rename = "R", skip_serializing_if = "Option::is_none")] pub r_uppercase: Option, #[serde(rename = "tt", skip_serializing_if = "Option::is_none")] pub tt: Option, #[serde(rename = "gtd", skip_serializing_if = "Option::is_none")] pub gtd: Option, } impl AlgoUpdateO { #[must_use] pub fn new() -> AlgoUpdateO { AlgoUpdateO { caid: None, aid: None, at: None, o: None, s: None, s_uppercase: None, ps: None, f: None, q: None, x_uppercase: None, ai: None, ap: None, aq: None, act: None, tp: None, p: None, v_uppercase: None, wt: None, pm: None, cp: None, p_p: None, r_uppercase: None, tt: None, gtd: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/all_book_tickers_stream_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllBookTickersStreamResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "A", skip_serializing_if = "Option::is_none")] pub a_uppercase: Option, } impl AllBookTickersStreamResponse { #[must_use] pub fn new() -> AllBookTickersStreamResponse { AllBookTickersStreamResponse { e: None, u: None, e_uppercase: None, t_uppercase: None, s: None, b: None, b_uppercase: None, a: None, a_uppercase: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/all_market_liquidation_order_streams_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMarketLiquidationOrderStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option>, } impl AllMarketLiquidationOrderStreamsResponse { #[must_use] pub fn new() -> AllMarketLiquidationOrderStreamsResponse { AllMarketLiquidationOrderStreamsResponse { e: None, e_uppercase: None, o: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/all_market_liquidation_order_streams_response_o.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMarketLiquidationOrderStreamsResponseO { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "S", skip_serializing_if = "Option::is_none")] pub s_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "ap", skip_serializing_if = "Option::is_none")] pub ap: Option, #[serde(rename = "X", skip_serializing_if = "Option::is_none")] pub x_uppercase: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "z", skip_serializing_if = "Option::is_none")] pub z: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl AllMarketLiquidationOrderStreamsResponseO { #[must_use] pub fn new() -> AllMarketLiquidationOrderStreamsResponseO { AllMarketLiquidationOrderStreamsResponseO { s: None, s_uppercase: None, o: None, f: None, q: None, p: None, ap: None, x_uppercase: None, l: None, z: None, t_uppercase: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/all_market_mini_tickers_stream_response_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMarketMiniTickersStreamResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, } impl AllMarketMiniTickersStreamResponseInner { #[must_use] pub fn new() -> AllMarketMiniTickersStreamResponseInner { AllMarketMiniTickersStreamResponseInner { e: None, e_uppercase: None, s: None, c: None, o: None, h: None, l: None, v: None, q: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/all_market_tickers_streams_response_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMarketTickersStreamsResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub w: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "F", skip_serializing_if = "Option::is_none")] pub f_uppercase: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, } impl AllMarketTickersStreamsResponseInner { #[must_use] pub fn new() -> AllMarketTickersStreamsResponseInner { AllMarketTickersStreamsResponseInner { e: None, e_uppercase: None, s: None, p: None, p_uppercase: None, w: None, c: None, q_uppercase: None, o: None, h: None, l: None, v: None, q: None, o_uppercase: None, c_uppercase: None, f_uppercase: None, l_uppercase: None, n: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/composite_index_symbol_information_streams_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CompositeIndexSymbolInformationStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option>, } impl CompositeIndexSymbolInformationStreamsResponse { #[must_use] pub fn new() -> CompositeIndexSymbolInformationStreamsResponse { CompositeIndexSymbolInformationStreamsResponse { e: None, e_uppercase: None, s: None, p: None, c_uppercase: None, c: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/composite_index_symbol_information_streams_response_c_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CompositeIndexSymbolInformationStreamsResponseCInner { #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub w: Option, #[serde(rename = "W", skip_serializing_if = "Option::is_none")] pub w_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, } impl CompositeIndexSymbolInformationStreamsResponseCInner { #[must_use] pub fn new() -> CompositeIndexSymbolInformationStreamsResponseCInner { CompositeIndexSymbolInformationStreamsResponseCInner { b: None, q: None, w: None, w_uppercase: None, i: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/conditional_order_trigger_reject.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ConditionalOrderTriggerReject { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "or", skip_serializing_if = "Option::is_none")] pub or: Option>, } impl ConditionalOrderTriggerReject { #[must_use] pub fn new() -> ConditionalOrderTriggerReject { ConditionalOrderTriggerReject { e_uppercase: None, t_uppercase: None, or: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/conditional_order_trigger_reject_or.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ConditionalOrderTriggerRejectOr { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, } impl ConditionalOrderTriggerRejectOr { #[must_use] pub fn new() -> ConditionalOrderTriggerRejectOr { ConditionalOrderTriggerRejectOr { s: None, i: None, r: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/continuous_contract_kline_candlestick_streams_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ContinuousContractKlineCandlestickStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "ct", skip_serializing_if = "Option::is_none")] pub ct: Option, #[serde(rename = "k", skip_serializing_if = "Option::is_none")] pub k: Option>, } impl ContinuousContractKlineCandlestickStreamsResponse { #[must_use] pub fn new() -> ContinuousContractKlineCandlestickStreamsResponse { ContinuousContractKlineCandlestickStreamsResponse { e: None, e_uppercase: None, ps: None, ct: None, k: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/continuous_contract_kline_candlestick_streams_response_k.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ContinuousContractKlineCandlestickStreamsResponseK { #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "V", skip_serializing_if = "Option::is_none")] pub v_uppercase: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, } impl ContinuousContractKlineCandlestickStreamsResponseK { #[must_use] pub fn new() -> ContinuousContractKlineCandlestickStreamsResponseK { ContinuousContractKlineCandlestickStreamsResponseK { t: None, t_uppercase: None, i: None, f: None, l_uppercase: None, o: None, c: None, h: None, l: None, v: None, n: None, x: None, q: None, v_uppercase: None, q_uppercase: None, b_uppercase: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/contract_info_stream_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ContractInfoStreamResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "ct", skip_serializing_if = "Option::is_none")] pub ct: Option, #[serde(rename = "dt", skip_serializing_if = "Option::is_none")] pub dt: Option, #[serde(rename = "ot", skip_serializing_if = "Option::is_none")] pub ot: Option, #[serde(rename = "cs", skip_serializing_if = "Option::is_none")] pub cs: Option, #[serde(rename = "bks", skip_serializing_if = "Option::is_none")] pub bks: Option>, } impl ContractInfoStreamResponse { #[must_use] pub fn new() -> ContractInfoStreamResponse { ContractInfoStreamResponse { e: None, e_uppercase: None, s: None, ps: None, ct: None, dt: None, ot: None, cs: None, bks: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/contract_info_stream_response_bks_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ContractInfoStreamResponseBksInner { #[serde(rename = "bs", skip_serializing_if = "Option::is_none")] pub bs: Option, #[serde(rename = "bnf", skip_serializing_if = "Option::is_none")] pub bnf: Option, #[serde(rename = "bnc", skip_serializing_if = "Option::is_none")] pub bnc: Option, #[serde(rename = "mmr", skip_serializing_if = "Option::is_none")] pub mmr: Option, #[serde(rename = "cf", skip_serializing_if = "Option::is_none")] pub cf: Option, #[serde(rename = "mi", skip_serializing_if = "Option::is_none")] pub mi: Option, #[serde(rename = "ma", skip_serializing_if = "Option::is_none")] pub ma: Option, } impl ContractInfoStreamResponseBksInner { #[must_use] pub fn new() -> ContractInfoStreamResponseBksInner { ContractInfoStreamResponseBksInner { bs: None, bnf: None, bnc: None, mmr: None, cf: None, mi: None, ma: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/diff_book_depth_streams_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DiffBookDepthStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "U", skip_serializing_if = "Option::is_none")] pub u_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "pu", skip_serializing_if = "Option::is_none")] pub pu: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option>>, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option>>, } impl DiffBookDepthStreamsResponse { #[must_use] pub fn new() -> DiffBookDepthStreamsResponse { DiffBookDepthStreamsResponse { e: None, e_uppercase: None, t_uppercase: None, s: None, u_uppercase: None, u: None, pu: None, b: None, a: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/grid_update.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GridUpdate { #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "gu", skip_serializing_if = "Option::is_none")] pub gu: Option>, } impl GridUpdate { #[must_use] pub fn new() -> GridUpdate { GridUpdate { t_uppercase: None, e_uppercase: None, gu: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/grid_update_gu.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GridUpdateGu { #[serde(rename = "si", skip_serializing_if = "Option::is_none")] pub si: Option, #[serde(rename = "st", skip_serializing_if = "Option::is_none")] pub st: Option, #[serde(rename = "ss", skip_serializing_if = "Option::is_none")] pub ss: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, #[serde(rename = "up", skip_serializing_if = "Option::is_none")] pub up: Option, #[serde(rename = "uq", skip_serializing_if = "Option::is_none")] pub uq: Option, #[serde(rename = "uf", skip_serializing_if = "Option::is_none")] pub uf: Option, #[serde(rename = "mp", skip_serializing_if = "Option::is_none")] pub mp: Option, #[serde(rename = "ut", skip_serializing_if = "Option::is_none")] pub ut: Option, } impl GridUpdateGu { #[must_use] pub fn new() -> GridUpdateGu { GridUpdateGu { si: None, st: None, ss: None, s: None, r: None, up: None, uq: None, uf: None, mp: None, ut: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/individual_symbol_book_ticker_streams_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndividualSymbolBookTickerStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "A", skip_serializing_if = "Option::is_none")] pub a_uppercase: Option, } impl IndividualSymbolBookTickerStreamsResponse { #[must_use] pub fn new() -> IndividualSymbolBookTickerStreamsResponse { IndividualSymbolBookTickerStreamsResponse { e: None, u: None, e_uppercase: None, t_uppercase: None, s: None, b: None, b_uppercase: None, a: None, a_uppercase: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/individual_symbol_mini_ticker_stream_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndividualSymbolMiniTickerStreamResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, } impl IndividualSymbolMiniTickerStreamResponse { #[must_use] pub fn new() -> IndividualSymbolMiniTickerStreamResponse { IndividualSymbolMiniTickerStreamResponse { e: None, e_uppercase: None, s: None, c: None, o: None, h: None, l: None, v: None, q: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/individual_symbol_ticker_streams_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IndividualSymbolTickerStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub w: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "F", skip_serializing_if = "Option::is_none")] pub f_uppercase: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, } impl IndividualSymbolTickerStreamsResponse { #[must_use] pub fn new() -> IndividualSymbolTickerStreamsResponse { IndividualSymbolTickerStreamsResponse { e: None, e_uppercase: None, s: None, p: None, p_uppercase: None, w: None, c: None, q_uppercase: None, o: None, h: None, l: None, v: None, q: None, o_uppercase: None, c_uppercase: None, f_uppercase: None, l_uppercase: None, n: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/kline_candlestick_streams_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlineCandlestickStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "k", skip_serializing_if = "Option::is_none")] pub k: Option>, } impl KlineCandlestickStreamsResponse { #[must_use] pub fn new() -> KlineCandlestickStreamsResponse { KlineCandlestickStreamsResponse { e: None, e_uppercase: None, s: None, k: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/kline_candlestick_streams_response_k.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlineCandlestickStreamsResponseK { #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "V", skip_serializing_if = "Option::is_none")] pub v_uppercase: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, } impl KlineCandlestickStreamsResponseK { #[must_use] pub fn new() -> KlineCandlestickStreamsResponseK { KlineCandlestickStreamsResponseK { t: None, t_uppercase: None, s: None, i: None, f: None, l_uppercase: None, o: None, c: None, h: None, l: None, v: None, n: None, x: None, q: None, v_uppercase: None, q_uppercase: None, b_uppercase: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/liquidation_order_streams_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct LiquidationOrderStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option>, } impl LiquidationOrderStreamsResponse { #[must_use] pub fn new() -> LiquidationOrderStreamsResponse { LiquidationOrderStreamsResponse { e: None, e_uppercase: None, o: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/listenkeyexpired.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Listenkeyexpired { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl Listenkeyexpired { #[must_use] pub fn new() -> Listenkeyexpired { Listenkeyexpired { e_uppercase: None, listen_key: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/margin_call.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginCall { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "cw", skip_serializing_if = "Option::is_none")] pub cw: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option>, } impl MarginCall { #[must_use] pub fn new() -> MarginCall { MarginCall { e_uppercase: None, cw: None, p: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/margin_call_p_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginCallPInner { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ps", skip_serializing_if = "Option::is_none")] pub ps: Option, #[serde(rename = "pa", skip_serializing_if = "Option::is_none")] pub pa: Option, #[serde(rename = "mt", skip_serializing_if = "Option::is_none")] pub mt: Option, #[serde(rename = "iw", skip_serializing_if = "Option::is_none")] pub iw: Option, #[serde(rename = "mp", skip_serializing_if = "Option::is_none")] pub mp: Option, #[serde(rename = "up", skip_serializing_if = "Option::is_none")] pub up: Option, #[serde(rename = "mm", skip_serializing_if = "Option::is_none")] pub mm: Option, } impl MarginCallPInner { #[must_use] pub fn new() -> MarginCallPInner { MarginCallPInner { s: None, ps: None, pa: None, mt: None, iw: None, mp: None, up: None, mm: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/mark_price_stream_for_all_market_response_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarkPriceStreamForAllMarketResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl MarkPriceStreamForAllMarketResponseInner { #[must_use] pub fn new() -> MarkPriceStreamForAllMarketResponseInner { MarkPriceStreamForAllMarketResponseInner { e: None, e_uppercase: None, s: None, p: None, i: None, p_uppercase: None, r: None, t_uppercase: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/mark_price_stream_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarkPriceStreamResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl MarkPriceStreamResponse { #[must_use] pub fn new() -> MarkPriceStreamResponse { MarkPriceStreamResponse { e: None, e_uppercase: None, s: None, p: None, i: None, p_uppercase: None, r: None, t_uppercase: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/multi_assets_mode_asset_index_response_inner.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MultiAssetsModeAssetIndexResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, #[serde(rename = "A", skip_serializing_if = "Option::is_none")] pub a_uppercase: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "g", skip_serializing_if = "Option::is_none")] pub g: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "G", skip_serializing_if = "Option::is_none")] pub g_uppercase: Option, } impl MultiAssetsModeAssetIndexResponseInner { #[must_use] pub fn new() -> MultiAssetsModeAssetIndexResponseInner { MultiAssetsModeAssetIndexResponseInner { e: None, e_uppercase: None, s: None, i: None, b: None, a: None, b_uppercase: None, a_uppercase: None, q: None, g: None, q_uppercase: None, g_uppercase: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/order_trade_update.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTradeUpdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option>, } impl OrderTradeUpdate { #[must_use] pub fn new() -> OrderTradeUpdate { OrderTradeUpdate { e_uppercase: None, t_uppercase: None, o: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/partial_book_depth_streams_response.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PartialBookDepthStreamsResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "U", skip_serializing_if = "Option::is_none")] pub u_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "pu", skip_serializing_if = "Option::is_none")] pub pu: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option>>, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option>>, } impl PartialBookDepthStreamsResponse { #[must_use] pub fn new() -> PartialBookDepthStreamsResponse { PartialBookDepthStreamsResponse { e: None, e_uppercase: None, t_uppercase: None, s: None, u_uppercase: None, u: None, pu: None, b: None, a: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/strategy_update.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StrategyUpdate { #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "su", skip_serializing_if = "Option::is_none")] pub su: Option>, } impl StrategyUpdate { #[must_use] pub fn new() -> StrategyUpdate { StrategyUpdate { t_uppercase: None, e_uppercase: None, su: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/strategy_update_su.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StrategyUpdateSu { #[serde(rename = "si", skip_serializing_if = "Option::is_none")] pub si: Option, #[serde(rename = "st", skip_serializing_if = "Option::is_none")] pub st: Option, #[serde(rename = "ss", skip_serializing_if = "Option::is_none")] pub ss: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "ut", skip_serializing_if = "Option::is_none")] pub ut: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, } impl StrategyUpdateSu { #[must_use] pub fn new() -> StrategyUpdateSu { StrategyUpdateSu { si: None, st: None, ss: None, s: None, ut: None, c: None, } } } src/derivatives_trading_usds_futures/websocket_streams/models/trade_lite.rs /* * Binance Derivatives Trading USDS Futures WebSocket Market Streams * * OpenAPI Specification for the Binance Derivatives Trading USDS Futures WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::derivatives_trading_usds_futures::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TradeLite { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "S", skip_serializing_if = "Option::is_none")] pub s_uppercase: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, } impl TradeLite { #[must_use] pub fn new() -> TradeLite { TradeLite { e_uppercase: None, t_uppercase: None, s: None, q: None, p: None, m: None, c: None, s_uppercase: None, l_uppercase: None, l: None, t: None, i: None, } } } src/dual_investment/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::dual_investment; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = dual_investment::DualInvestmentRestApi::production(configuration); let params = dual_investment::rest_api::GetDualInvestmentPositionsParams::default(); let response = client.get_dual_investment_positions(params).await?; ``` src/dual_investment/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::dual_investment; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = dual_investment::DualInvestmentRestApi::production(configuration); let params = dual_investment::rest_api::GetDualInvestmentPositionsParams::default(); let response = client.get_dual_investment_positions(params).await?; ``` src/dual_investment/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::dual_investment; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = dual_investment::DualInvestmentRestApi::production(configuration); let params = dual_investment::rest_api::GetDualInvestmentPositionsParams::default(); match client.get_dual_investment_positions(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/dual_investment/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::dual_investment; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = dual_investment::DualInvestmentRestApi::production(configuration); let params = dual_investment::rest_api::GetDualInvestmentPositionsParams::default(); let response = client.get_dual_investment_positions(params).await?; ``` src/dual_investment/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::dual_investment; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = dual_investment::DualInvestmentRestApi::production(configuration); let params = dual_investment::rest_api::GetDualInvestmentPositionsParams::default(); let response = client.get_dual_investment_positions(params).await?; ``` src/dual_investment/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::dual_investment; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = dual_investment::DualInvestmentRestApi::production(configuration); let params = dual_investment::rest_api::GetDualInvestmentPositionsParams::default(); let response = client.get_dual_investment_positions(params).await?; ``` src/dual_investment/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::dual_investment; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = dual_investment::DualInvestmentRestApi::production(configuration); let params = dual_investment::rest_api::GetDualInvestmentPositionsParams::default(); let response = client.get_dual_investment_positions(params).await?; ``` src/dual_investment/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::dual_investment; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = dual_investment::DualInvestmentRestApi::production(configuration); let params = dual_investment::rest_api::GetDualInvestmentPositionsParams::default(); let response = client.get_dual_investment_positions(params).await?; ``` src/dual_investment/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::dual_investment; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = dual_investment::DualInvestmentRestApi::production(configuration); let params = dual_investment::rest_api::GetDualInvestmentPositionsParams::default(); let response = client.get_dual_investment_positions(params).await?; ``` src/dual_investment/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::DUAL_INVESTMENT_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the `DualInvestment` REST API client for interacting with the Binance `DualInvestment` REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct DualInvestmentRestApi {} impl DualInvestmentRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production `DualInvestment` REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("dual-investment"); if config.base_path.is_none() { config.base_path = Some(DUAL_INVESTMENT_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(DUAL_INVESTMENT_REST_API_PROD_URL.to_string()); DualInvestmentRestApi::from_config(config) } } src/dual_investment/rest_api/apis/mod.rs /* * Binance Dual Investment REST API * * OpenAPI Specification for the Binance Dual Investment REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod market_data_api; pub use market_data_api::*; pub mod trade_api; pub use trade_api::*; src/dual_investment/rest_api/models/change_auto_compound_status_response.rs /* * Binance Dual Investment REST API * * OpenAPI Specification for the Binance Dual Investment REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::dual_investment::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ChangeAutoCompoundStatusResponse { #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")] pub position_id: Option, #[serde(rename = "autoCompoundPlan", skip_serializing_if = "Option::is_none")] pub auto_compound_plan: Option, } impl ChangeAutoCompoundStatusResponse { #[must_use] pub fn new() -> ChangeAutoCompoundStatusResponse { ChangeAutoCompoundStatusResponse { position_id: None, auto_compound_plan: None, } } } src/dual_investment/rest_api/models/check_dual_investment_accounts_response.rs /* * Binance Dual Investment REST API * * OpenAPI Specification for the Binance Dual Investment REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::dual_investment::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckDualInvestmentAccountsResponse { #[serde(rename = "totalAmountInBTC", skip_serializing_if = "Option::is_none")] pub total_amount_in_btc: Option, #[serde(rename = "totalAmountInUSDT", skip_serializing_if = "Option::is_none")] pub total_amount_in_usdt: Option, } impl CheckDualInvestmentAccountsResponse { #[must_use] pub fn new() -> CheckDualInvestmentAccountsResponse { CheckDualInvestmentAccountsResponse { total_amount_in_btc: None, total_amount_in_usdt: None, } } } src/dual_investment/rest_api/models/get_dual_investment_positions_response.rs /* * Binance Dual Investment REST API * * OpenAPI Specification for the Binance Dual Investment REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::dual_investment::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDualInvestmentPositionsResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "list", skip_serializing_if = "Option::is_none")] pub list: Option>, } impl GetDualInvestmentPositionsResponse { #[must_use] pub fn new() -> GetDualInvestmentPositionsResponse { GetDualInvestmentPositionsResponse { total: None, list: None, } } } src/dual_investment/rest_api/models/get_dual_investment_positions_response_list_inner.rs /* * Binance Dual Investment REST API * * OpenAPI Specification for the Binance Dual Investment REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::dual_investment::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDualInvestmentPositionsResponseListInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "investCoin", skip_serializing_if = "Option::is_none")] pub invest_coin: Option, #[serde(rename = "exercisedCoin", skip_serializing_if = "Option::is_none")] pub exercised_coin: Option, #[serde(rename = "subscriptionAmount", skip_serializing_if = "Option::is_none")] pub subscription_amount: Option, #[serde(rename = "strikePrice", skip_serializing_if = "Option::is_none")] pub strike_price: Option, #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] pub duration: Option, #[serde(rename = "settleDate", skip_serializing_if = "Option::is_none")] pub settle_date: Option, #[serde(rename = "purchaseStatus", skip_serializing_if = "Option::is_none")] pub purchase_status: Option, #[serde(rename = "apr", skip_serializing_if = "Option::is_none")] pub apr: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "purchaseEndTime", skip_serializing_if = "Option::is_none")] pub purchase_end_time: Option, #[serde(rename = "optionType", skip_serializing_if = "Option::is_none")] pub option_type: Option, #[serde(rename = "autoCompoundPlan", skip_serializing_if = "Option::is_none")] pub auto_compound_plan: Option, } impl GetDualInvestmentPositionsResponseListInner { #[must_use] pub fn new() -> GetDualInvestmentPositionsResponseListInner { GetDualInvestmentPositionsResponseListInner { id: None, invest_coin: None, exercised_coin: None, subscription_amount: None, strike_price: None, duration: None, settle_date: None, purchase_status: None, apr: None, order_id: None, purchase_end_time: None, option_type: None, auto_compound_plan: None, } } } src/dual_investment/rest_api/models/get_dual_investment_product_list_response.rs /* * Binance Dual Investment REST API * * OpenAPI Specification for the Binance Dual Investment REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::dual_investment::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDualInvestmentProductListResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "list", skip_serializing_if = "Option::is_none")] pub list: Option>, } impl GetDualInvestmentProductListResponse { #[must_use] pub fn new() -> GetDualInvestmentProductListResponse { GetDualInvestmentProductListResponse { total: None, list: None, } } } src/dual_investment/rest_api/models/get_dual_investment_product_list_response_list_inner.rs /* * Binance Dual Investment REST API * * OpenAPI Specification for the Binance Dual Investment REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::dual_investment::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDualInvestmentProductListResponseListInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "investCoin", skip_serializing_if = "Option::is_none")] pub invest_coin: Option, #[serde(rename = "exercisedCoin", skip_serializing_if = "Option::is_none")] pub exercised_coin: Option, #[serde(rename = "strikePrice", skip_serializing_if = "Option::is_none")] pub strike_price: Option, #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] pub duration: Option, #[serde(rename = "settleDate", skip_serializing_if = "Option::is_none")] pub settle_date: Option, #[serde(rename = "purchaseDecimal", skip_serializing_if = "Option::is_none")] pub purchase_decimal: Option, #[serde(rename = "purchaseEndTime", skip_serializing_if = "Option::is_none")] pub purchase_end_time: Option, #[serde(rename = "canPurchase", skip_serializing_if = "Option::is_none")] pub can_purchase: Option, #[serde(rename = "apr", skip_serializing_if = "Option::is_none")] pub apr: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "minAmount", skip_serializing_if = "Option::is_none")] pub min_amount: Option, #[serde(rename = "maxAmount", skip_serializing_if = "Option::is_none")] pub max_amount: Option, #[serde(rename = "createTimestamp", skip_serializing_if = "Option::is_none")] pub create_timestamp: Option, #[serde(rename = "optionType", skip_serializing_if = "Option::is_none")] pub option_type: Option, #[serde( rename = "isAutoCompoundEnable", skip_serializing_if = "Option::is_none" )] pub is_auto_compound_enable: Option, #[serde( rename = "autoCompoundPlanList", skip_serializing_if = "Option::is_none" )] pub auto_compound_plan_list: Option>, } impl GetDualInvestmentProductListResponseListInner { #[must_use] pub fn new() -> GetDualInvestmentProductListResponseListInner { GetDualInvestmentProductListResponseListInner { id: None, invest_coin: None, exercised_coin: None, strike_price: None, duration: None, settle_date: None, purchase_decimal: None, purchase_end_time: None, can_purchase: None, apr: None, order_id: None, min_amount: None, max_amount: None, create_timestamp: None, option_type: None, is_auto_compound_enable: None, auto_compound_plan_list: None, } } } src/dual_investment/rest_api/models/mod.rs /* * Binance Dual Investment REST API * * OpenAPI Specification for the Binance Dual Investment REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod change_auto_compound_status_response; pub use self::change_auto_compound_status_response::ChangeAutoCompoundStatusResponse; pub mod check_dual_investment_accounts_response; pub use self::check_dual_investment_accounts_response::CheckDualInvestmentAccountsResponse; pub mod get_dual_investment_positions_response; pub use self::get_dual_investment_positions_response::GetDualInvestmentPositionsResponse; pub mod get_dual_investment_positions_response_list_inner; pub use self::get_dual_investment_positions_response_list_inner::GetDualInvestmentPositionsResponseListInner; pub mod get_dual_investment_product_list_response; pub use self::get_dual_investment_product_list_response::GetDualInvestmentProductListResponse; pub mod get_dual_investment_product_list_response_list_inner; pub use self::get_dual_investment_product_list_response_list_inner::GetDualInvestmentProductListResponseListInner; pub mod subscribe_dual_investment_products_response; pub use self::subscribe_dual_investment_products_response::SubscribeDualInvestmentProductsResponse; src/dual_investment/rest_api/models/subscribe_dual_investment_products_response.rs /* * Binance Dual Investment REST API * * OpenAPI Specification for the Binance Dual Investment REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::dual_investment::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubscribeDualInvestmentProductsResponse { #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")] pub position_id: Option, #[serde(rename = "investCoin", skip_serializing_if = "Option::is_none")] pub invest_coin: Option, #[serde(rename = "exercisedCoin", skip_serializing_if = "Option::is_none")] pub exercised_coin: Option, #[serde(rename = "subscriptionAmount", skip_serializing_if = "Option::is_none")] pub subscription_amount: Option, #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] pub duration: Option, #[serde(rename = "autoCompoundPlan", skip_serializing_if = "Option::is_none")] pub auto_compound_plan: Option, #[serde(rename = "strikePrice", skip_serializing_if = "Option::is_none")] pub strike_price: Option, #[serde(rename = "settleDate", skip_serializing_if = "Option::is_none")] pub settle_date: Option, #[serde(rename = "purchaseStatus", skip_serializing_if = "Option::is_none")] pub purchase_status: Option, #[serde(rename = "apr", skip_serializing_if = "Option::is_none")] pub apr: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "purchaseTime", skip_serializing_if = "Option::is_none")] pub purchase_time: Option, #[serde(rename = "optionType", skip_serializing_if = "Option::is_none")] pub option_type: Option, } impl SubscribeDualInvestmentProductsResponse { #[must_use] pub fn new() -> SubscribeDualInvestmentProductsResponse { SubscribeDualInvestmentProductsResponse { position_id: None, invest_coin: None, exercised_coin: None, subscription_amount: None, duration: None, auto_compound_plan: None, strike_price: None, settle_date: None, purchase_status: None, apr: None, order_id: None, purchase_time: None, option_type: None, } } } src/fiat/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::fiat; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = fiat::FiatRestApi::production(configuration); let params = fiat::rest_api::GetFiatDepositWithdrawHistoryParams::builder("0".to_string()).build()?; let response = client.get_fiat_deposit_withdraw_history(params).await?; ``` src/fiat/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::fiat; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = fiat::FiatRestApi::production(configuration); let params = fiat::rest_api::GetFiatDepositWithdrawHistoryParams::builder("0".to_string()).build()?; let response = client.get_fiat_deposit_withdraw_history(params).await?; ``` src/fiat/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::fiat; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = fiat::FiatRestApi::production(configuration); let params = fiat::rest_api::GetFiatDepositWithdrawHistoryParams::builder("0".to_string()).build()?; match client.get_fiat_deposit_withdraw_history(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/fiat/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::fiat; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = fiat::FiatRestApi::production(configuration); let params = fiat::rest_api::GetFiatDepositWithdrawHistoryParams::builder("0".to_string()).build()?; let response = client.get_fiat_deposit_withdraw_history(params).await?; ``` src/fiat/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::fiat; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = fiat::FiatRestApi::production(configuration); let params = fiat::rest_api::GetFiatDepositWithdrawHistoryParams::builder("0".to_string()).build()?; let response = client.get_fiat_deposit_withdraw_history(params).await?; ``` src/fiat/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::fiat; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = fiat::FiatRestApi::production(configuration); let params = fiat::rest_api::GetFiatDepositWithdrawHistoryParams::builder("0".to_string()).build()?; let response = client.get_fiat_deposit_withdraw_history(params).await?; ``` src/fiat/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::fiat; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = fiat::FiatRestApi::production(configuration); let params = fiat::rest_api::GetFiatDepositWithdrawHistoryParams::builder("0".to_string()).build()?; let response = client.get_fiat_deposit_withdraw_history(params).await?; ``` src/fiat/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::fiat; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = fiat::FiatRestApi::production(configuration); let params = fiat::rest_api::GetFiatDepositWithdrawHistoryParams::builder("0".to_string()).build()?; let response = client.get_fiat_deposit_withdraw_history(params).await?; ``` src/fiat/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::fiat; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = fiat::FiatRestApi::production(configuration); let params = fiat::rest_api::GetFiatDepositWithdrawHistoryParams::builder("0".to_string()).build()?; let response = client.get_fiat_deposit_withdraw_history(params).await?; ``` src/fiat/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::FIAT_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the Fiat REST API client for interacting with the Binance Fiat REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct FiatRestApi {} impl FiatRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production Fiat REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("fiat"); if config.base_path.is_none() { config.base_path = Some(FIAT_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(FIAT_REST_API_PROD_URL.to_string()); FiatRestApi::from_config(config) } } src/fiat/rest_api/apis/mod.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod fiat_api; pub use fiat_api::*; src/fiat/rest_api/models/deposit_response.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::fiat::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepositResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl DepositResponse { #[must_use] pub fn new() -> DepositResponse { DepositResponse { code: None, message: None, data: None, } } } src/fiat/rest_api/models/deposit_response_data.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::fiat::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepositResponseData { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, } impl DepositResponseData { #[must_use] pub fn new() -> DepositResponseData { DepositResponseData { order_id: None } } } src/fiat/rest_api/models/fiat_withdraw_response.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::fiat::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FiatWithdrawResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl FiatWithdrawResponse { #[must_use] pub fn new() -> FiatWithdrawResponse { FiatWithdrawResponse { code: None, message: None, data: None, } } } src/fiat/rest_api/models/get_fiat_deposit_withdraw_history_response.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::fiat::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFiatDepositWithdrawHistoryResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl GetFiatDepositWithdrawHistoryResponse { #[must_use] pub fn new() -> GetFiatDepositWithdrawHistoryResponse { GetFiatDepositWithdrawHistoryResponse { code: None, message: None, data: None, total: None, success: None, } } } src/fiat/rest_api/models/get_fiat_deposit_withdraw_history_response_data_inner.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::fiat::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFiatDepositWithdrawHistoryResponseDataInner { #[serde(rename = "orderNo", skip_serializing_if = "Option::is_none")] pub order_no: Option, #[serde(rename = "fiatCurrency", skip_serializing_if = "Option::is_none")] pub fiat_currency: Option, #[serde(rename = "indicatedAmount", skip_serializing_if = "Option::is_none")] pub indicated_amount: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "totalFee", skip_serializing_if = "Option::is_none")] pub total_fee: Option, #[serde(rename = "method", skip_serializing_if = "Option::is_none")] pub method: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl GetFiatDepositWithdrawHistoryResponseDataInner { #[must_use] pub fn new() -> GetFiatDepositWithdrawHistoryResponseDataInner { GetFiatDepositWithdrawHistoryResponseDataInner { order_no: None, fiat_currency: None, indicated_amount: None, amount: None, total_fee: None, method: None, status: None, create_time: None, update_time: None, } } } src/fiat/rest_api/models/get_fiat_payments_history_response.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::fiat::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFiatPaymentsHistoryResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl GetFiatPaymentsHistoryResponse { #[must_use] pub fn new() -> GetFiatPaymentsHistoryResponse { GetFiatPaymentsHistoryResponse { code: None, message: None, data: None, total: None, success: None, } } } src/fiat/rest_api/models/get_fiat_payments_history_response_data_inner.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::fiat::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFiatPaymentsHistoryResponseDataInner { #[serde(rename = "orderNo", skip_serializing_if = "Option::is_none")] pub order_no: Option, #[serde(rename = "sourceAmount", skip_serializing_if = "Option::is_none")] pub source_amount: Option, #[serde(rename = "fiatCurrency", skip_serializing_if = "Option::is_none")] pub fiat_currency: Option, #[serde(rename = "obtainAmount", skip_serializing_if = "Option::is_none")] pub obtain_amount: Option, #[serde(rename = "cryptoCurrency", skip_serializing_if = "Option::is_none")] pub crypto_currency: Option, #[serde(rename = "totalFee", skip_serializing_if = "Option::is_none")] pub total_fee: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "paymentMethod", skip_serializing_if = "Option::is_none")] pub payment_method: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl GetFiatPaymentsHistoryResponseDataInner { #[must_use] pub fn new() -> GetFiatPaymentsHistoryResponseDataInner { GetFiatPaymentsHistoryResponseDataInner { order_no: None, source_amount: None, fiat_currency: None, obtain_amount: None, crypto_currency: None, total_fee: None, price: None, status: None, payment_method: None, create_time: None, update_time: None, } } } src/fiat/rest_api/models/get_order_detail_response.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::fiat::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderDetailResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl GetOrderDetailResponse { #[must_use] pub fn new() -> GetOrderDetailResponse { GetOrderDetailResponse { code: None, message: None, data: None, } } } src/fiat/rest_api/models/get_order_detail_response_data.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::fiat::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderDetailResponseData { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderStatus", skip_serializing_if = "Option::is_none")] pub order_status: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "fiatCurrency", skip_serializing_if = "Option::is_none")] pub fiat_currency: Option, #[serde(rename = "errorCode", skip_serializing_if = "Option::is_none")] pub error_code: Option, #[serde(rename = "errorMessage", skip_serializing_if = "Option::is_none")] pub error_message: Option, #[serde(rename = "ext", skip_serializing_if = "Option::is_none")] pub ext: Option, } impl GetOrderDetailResponseData { #[must_use] pub fn new() -> GetOrderDetailResponseData { GetOrderDetailResponseData { order_id: None, order_status: None, amount: None, fee: None, fiat_currency: None, error_code: None, error_message: None, ext: None, } } } src/fiat/rest_api/models/mod.rs /* * Binance Fiat REST API * * OpenAPI Specification for the Binance Fiat REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod deposit_response; pub use self::deposit_response::DepositResponse; pub mod deposit_response_data; pub use self::deposit_response_data::DepositResponseData; pub mod fiat_withdraw_response; pub use self::fiat_withdraw_response::FiatWithdrawResponse; pub mod get_fiat_deposit_withdraw_history_response; pub use self::get_fiat_deposit_withdraw_history_response::GetFiatDepositWithdrawHistoryResponse; pub mod get_fiat_deposit_withdraw_history_response_data_inner; pub use self::get_fiat_deposit_withdraw_history_response_data_inner::GetFiatDepositWithdrawHistoryResponseDataInner; pub mod get_fiat_payments_history_response; pub use self::get_fiat_payments_history_response::GetFiatPaymentsHistoryResponse; pub mod get_fiat_payments_history_response_data_inner; pub use self::get_fiat_payments_history_response_data_inner::GetFiatPaymentsHistoryResponseDataInner; pub mod get_order_detail_response; pub use self::get_order_detail_response::GetOrderDetailResponse; pub mod get_order_detail_response_data; pub use self::get_order_detail_response_data::GetOrderDetailResponseData; src/gift_card/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::gift_card; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = gift_card::GiftCardRestApi::production(configuration); let params = gift_card::rest_api::CreateASingleTokenGiftCardParams::builder("6H9EKF5ECCWFBHGE".to_string(), 1000.0).build()?; let response = client.create_a_single_token_gift_card(params).await?; ``` src/gift_card/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::gift_card; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = gift_card::GiftCardRestApi::production(configuration); let params = gift_card::rest_api::CreateASingleTokenGiftCardParams::builder("6H9EKF5ECCWFBHGE".to_string(), 1000.0).build()?; let response = client.create_a_single_token_gift_card(params).await?; ``` src/gift_card/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::gift_card; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = gift_card::GiftCardRestApi::production(configuration); let params = gift_card::rest_api::CreateASingleTokenGiftCardParams::builder("6H9EKF5ECCWFBHGE".to_string(), 1000.0).build()?; match client.create_a_single_token_gift_card(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/gift_card/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::gift_card; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = gift_card::GiftCardRestApi::production(configuration); let params = gift_card::rest_api::CreateASingleTokenGiftCardParams::builder("6H9EKF5ECCWFBHGE".to_string(), 1000.0).build()?; let response = client.create_a_single_token_gift_card(params).await?; ``` src/gift_card/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::gift_card; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = gift_card::GiftCardRestApi::production(configuration); let params = gift_card::rest_api::CreateASingleTokenGiftCardParams::builder("6H9EKF5ECCWFBHGE".to_string(), 1000.0).build()?; let response = client.create_a_single_token_gift_card(params).await?; ``` src/gift_card/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::gift_card; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = gift_card::GiftCardRestApi::production(configuration); let params = gift_card::rest_api::CreateASingleTokenGiftCardParams::builder("6H9EKF5ECCWFBHGE".to_string(), 1000.0).build()?; let response = client.create_a_single_token_gift_card(params).await?; ``` src/gift_card/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::gift_card; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = gift_card::GiftCardRestApi::production(configuration); let params = gift_card::rest_api::CreateASingleTokenGiftCardParams::builder("6H9EKF5ECCWFBHGE".to_string(), 1000.0).build()?; let response = client.create_a_single_token_gift_card(params).await?; ``` src/gift_card/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::gift_card; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = gift_card::GiftCardRestApi::production(configuration); let params = gift_card::rest_api::CreateASingleTokenGiftCardParams::builder("6H9EKF5ECCWFBHGE".to_string(), 1000.0).build()?; let response = client.create_a_single_token_gift_card(params).await?; ``` src/gift_card/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::gift_card; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = gift_card::GiftCardRestApi::production(configuration); let params = gift_card::rest_api::CreateASingleTokenGiftCardParams::builder("6H9EKF5ECCWFBHGE".to_string(), 1000.0).build()?; let response = client.create_a_single_token_gift_card(params).await?; ``` src/gift_card/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::GIFT_CARD_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the `GiftCard` REST API client for interacting with the Binance `GiftCard` REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct GiftCardRestApi {} impl GiftCardRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production `GiftCard` REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("gift-card"); if config.base_path.is_none() { config.base_path = Some(GIFT_CARD_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(GIFT_CARD_REST_API_PROD_URL.to_string()); GiftCardRestApi::from_config(config) } } src/gift_card/rest_api/apis/mod.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod market_data_api; pub use market_data_api::*; src/gift_card/rest_api/models/create_a_dual_token_gift_card_response.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::gift_card::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateADualTokenGiftCardResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl CreateADualTokenGiftCardResponse { #[must_use] pub fn new() -> CreateADualTokenGiftCardResponse { CreateADualTokenGiftCardResponse { code: None, message: None, data: None, success: None, } } } src/gift_card/rest_api/models/create_a_dual_token_gift_card_response_data.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::gift_card::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateADualTokenGiftCardResponseData { #[serde(rename = "referenceNo", skip_serializing_if = "Option::is_none")] pub reference_no: Option, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "expiredTime", skip_serializing_if = "Option::is_none")] pub expired_time: Option, } impl CreateADualTokenGiftCardResponseData { #[must_use] pub fn new() -> CreateADualTokenGiftCardResponseData { CreateADualTokenGiftCardResponseData { reference_no: None, code: None, expired_time: None, } } } src/gift_card/rest_api/models/create_a_single_token_gift_card_response.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::gift_card::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateASingleTokenGiftCardResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl CreateASingleTokenGiftCardResponse { #[must_use] pub fn new() -> CreateASingleTokenGiftCardResponse { CreateASingleTokenGiftCardResponse { code: None, message: None, data: None, success: None, } } } src/gift_card/rest_api/models/fetch_rsa_public_key_response.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::gift_card::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FetchRsaPublicKeyResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl FetchRsaPublicKeyResponse { #[must_use] pub fn new() -> FetchRsaPublicKeyResponse { FetchRsaPublicKeyResponse { code: None, message: None, data: None, success: None, } } } src/gift_card/rest_api/models/fetch_token_limit_response.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::gift_card::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FetchTokenLimitResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl FetchTokenLimitResponse { #[must_use] pub fn new() -> FetchTokenLimitResponse { FetchTokenLimitResponse { code: None, message: None, data: None, success: None, } } } src/gift_card/rest_api/models/fetch_token_limit_response_data_inner.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::gift_card::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FetchTokenLimitResponseDataInner { #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "fromMin", skip_serializing_if = "Option::is_none")] pub from_min: Option, #[serde(rename = "fromMax", skip_serializing_if = "Option::is_none")] pub from_max: Option, } impl FetchTokenLimitResponseDataInner { #[must_use] pub fn new() -> FetchTokenLimitResponseDataInner { FetchTokenLimitResponseDataInner { coin: None, from_min: None, from_max: None, } } } src/gift_card/rest_api/models/mod.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod create_a_dual_token_gift_card_response; pub use self::create_a_dual_token_gift_card_response::CreateADualTokenGiftCardResponse; pub mod create_a_dual_token_gift_card_response_data; pub use self::create_a_dual_token_gift_card_response_data::CreateADualTokenGiftCardResponseData; pub mod create_a_single_token_gift_card_response; pub use self::create_a_single_token_gift_card_response::CreateASingleTokenGiftCardResponse; pub mod fetch_rsa_public_key_response; pub use self::fetch_rsa_public_key_response::FetchRsaPublicKeyResponse; pub mod fetch_token_limit_response; pub use self::fetch_token_limit_response::FetchTokenLimitResponse; pub mod fetch_token_limit_response_data_inner; pub use self::fetch_token_limit_response_data_inner::FetchTokenLimitResponseDataInner; pub mod redeem_a_binance_gift_card_response; pub use self::redeem_a_binance_gift_card_response::RedeemABinanceGiftCardResponse; pub mod redeem_a_binance_gift_card_response_data; pub use self::redeem_a_binance_gift_card_response_data::RedeemABinanceGiftCardResponseData; pub mod verify_binance_gift_card_by_gift_card_number_response; pub use self::verify_binance_gift_card_by_gift_card_number_response::VerifyBinanceGiftCardByGiftCardNumberResponse; pub mod verify_binance_gift_card_by_gift_card_number_response_data; pub use self::verify_binance_gift_card_by_gift_card_number_response_data::VerifyBinanceGiftCardByGiftCardNumberResponseData; src/gift_card/rest_api/models/redeem_a_binance_gift_card_response.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::gift_card::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RedeemABinanceGiftCardResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl RedeemABinanceGiftCardResponse { #[must_use] pub fn new() -> RedeemABinanceGiftCardResponse { RedeemABinanceGiftCardResponse { code: None, message: None, data: None, success: None, } } } src/gift_card/rest_api/models/redeem_a_binance_gift_card_response_data.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::gift_card::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RedeemABinanceGiftCardResponseData { #[serde(rename = "referenceNo", skip_serializing_if = "Option::is_none")] pub reference_no: Option, #[serde(rename = "identityNo", skip_serializing_if = "Option::is_none")] pub identity_no: Option, #[serde(rename = "token", skip_serializing_if = "Option::is_none")] pub token: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, } impl RedeemABinanceGiftCardResponseData { #[must_use] pub fn new() -> RedeemABinanceGiftCardResponseData { RedeemABinanceGiftCardResponseData { reference_no: None, identity_no: None, token: None, amount: None, } } } src/gift_card/rest_api/models/verify_binance_gift_card_by_gift_card_number_response.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::gift_card::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct VerifyBinanceGiftCardByGiftCardNumberResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl VerifyBinanceGiftCardByGiftCardNumberResponse { #[must_use] pub fn new() -> VerifyBinanceGiftCardByGiftCardNumberResponse { VerifyBinanceGiftCardByGiftCardNumberResponse { code: None, message: None, data: None, success: None, } } } src/gift_card/rest_api/models/verify_binance_gift_card_by_gift_card_number_response_data.rs /* * Binance Gift Card REST API * * OpenAPI Specification for the Binance Gift Card REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::gift_card::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct VerifyBinanceGiftCardByGiftCardNumberResponseData { #[serde(rename = "valid", skip_serializing_if = "Option::is_none")] pub valid: Option, #[serde(rename = "token", skip_serializing_if = "Option::is_none")] pub token: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, } impl VerifyBinanceGiftCardByGiftCardNumberResponseData { #[must_use] pub fn new() -> VerifyBinanceGiftCardByGiftCardNumberResponseData { VerifyBinanceGiftCardByGiftCardNumberResponseData { valid: None, token: None, amount: None, } } } src/lib.rs pub mod common; pub use common::config; pub use common::constants; pub use common::errors; pub use common::models; #[cfg(feature = "algo")] pub mod algo; #[cfg(feature = "c2c")] pub mod c2c; #[cfg(feature = "convert")] pub mod convert; #[cfg(feature = "copy_trading")] pub mod copy_trading; #[cfg(feature = "crypto_loan")] pub mod crypto_loan; #[cfg(feature = "derivatives_trading_coin_futures")] pub mod derivatives_trading_coin_futures; #[cfg(feature = "derivatives_trading_options")] pub mod derivatives_trading_options; #[cfg(feature = "derivatives_trading_portfolio_margin")] pub mod derivatives_trading_portfolio_margin; #[cfg(feature = "derivatives_trading_portfolio_margin_pro")] pub mod derivatives_trading_portfolio_margin_pro; #[cfg(feature = "derivatives_trading_usds_futures")] pub mod derivatives_trading_usds_futures; #[cfg(feature = "dual_investment")] pub mod dual_investment; #[cfg(feature = "fiat")] pub mod fiat; #[cfg(feature = "gift_card")] pub mod gift_card; #[cfg(feature = "margin_trading")] pub mod margin_trading; #[cfg(feature = "mining")] pub mod mining; #[cfg(feature = "nft")] pub mod nft; #[cfg(feature = "pay")] pub mod pay; #[cfg(feature = "rebate")] pub mod rebate; #[cfg(feature = "simple_earn")] pub mod simple_earn; #[cfg(feature = "spot")] pub mod spot; #[cfg(feature = "staking")] pub mod staking; #[cfg(feature = "sub_account")] pub mod sub_account; #[cfg(feature = "vip_loan")] pub mod vip_loan; #[cfg(feature = "wallet")] pub mod wallet; #[cfg(test)] static TOKIO_SHARED_RT: std::sync::LazyLock = std::sync::LazyLock::new(|| { tokio::runtime::Builder::new_current_thread() .enable_all() .build() .expect("Failed to build shared Tokio Runtime") }); src/margin_trading/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::margin_trading; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = margin_trading::MarginTradingRestApi::production(configuration); let params = margin_trading::rest_api::GetSummaryOfMarginAccountParams::default(); let response = client.get_summary_of_margin_account(params).await?; ``` src/margin_trading/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::margin_trading; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = margin_trading::MarginTradingRestApi::production(configuration); let params = margin_trading::rest_api::GetSummaryOfMarginAccountParams::default(); let response = client.get_summary_of_margin_account(params).await?; ``` src/margin_trading/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::margin_trading; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = margin_trading::MarginTradingRestApi::production(configuration); let params = margin_trading::rest_api::GetSummaryOfMarginAccountParams::default(); match client.get_summary_of_margin_account(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/margin_trading/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::margin_trading; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = margin_trading::MarginTradingRestApi::production(configuration); let params = margin_trading::rest_api::GetSummaryOfMarginAccountParams::default(); let response = client.get_summary_of_margin_account(params).await?; ``` src/margin_trading/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::margin_trading; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = margin_trading::MarginTradingRestApi::production(configuration); let params = margin_trading::rest_api::GetSummaryOfMarginAccountParams::default(); let response = client.get_summary_of_margin_account(params).await?; ``` src/margin_trading/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::margin_trading; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = margin_trading::MarginTradingRestApi::production(configuration); let params = margin_trading::rest_api::GetSummaryOfMarginAccountParams::default(); let response = client.get_summary_of_margin_account(params).await?; ``` src/margin_trading/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::margin_trading; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = margin_trading::MarginTradingRestApi::production(configuration); let params = margin_trading::rest_api::GetSummaryOfMarginAccountParams::default(); let response = client.get_summary_of_margin_account(params).await?; ``` src/margin_trading/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::margin_trading; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = margin_trading::MarginTradingRestApi::production(configuration); let params = margin_trading::rest_api::GetSummaryOfMarginAccountParams::default(); let response = client.get_summary_of_margin_account(params).await?; ``` src/margin_trading/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::margin_trading; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = margin_trading::MarginTradingRestApi::production(configuration); let params = margin_trading::rest_api::GetSummaryOfMarginAccountParams::default(); let response = client.get_summary_of_margin_account(params).await?; ``` src/margin_trading/mod.rs pub mod rest_api; pub mod websocket_streams; use crate::common::{ config::{ConfigurationRestApi, ConfigurationWebsocketStreams}, constants::{MARGIN_TRADING_REST_API_PROD_URL, MARGIN_TRADING_WS_STREAMS_PROD_URL}, logger, utils::build_user_agent, }; /// Represents the `MarginTrading` REST API client for interacting with the Binance `MarginTrading` REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct MarginTradingRestApi {} impl MarginTradingRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production `MarginTrading` REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("margin-trading"); if config.base_path.is_none() { config.base_path = Some(MARGIN_TRADING_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(MARGIN_TRADING_REST_API_PROD_URL.to_string()); MarginTradingRestApi::from_config(config) } } /// Represents the `MarginTrading` WebSocket Streams client for interacting with the Binance `MarginTrading` WebSocket Streams. /// /// This struct provides methods to create WebSocket Streams clients for the production environment. pub struct MarginTradingWsStreams {} impl MarginTradingWsStreams { /// Creates a WebSocket streams client configured with the given settings. /// /// If no WS URL is specified in the configuration, defaults to the production `MarginTrading` WebSocket Streams URL. /// /// # Arguments /// /// * `config` - Configuration for the WebSocket streams client /// /// # Returns /// /// A new WebSocket streams client configured with the provided settings #[must_use] pub fn from_config( mut config: ConfigurationWebsocketStreams, ) -> websocket_streams::WebsocketStreamsHandle { logger::init(); config.user_agent = build_user_agent("margin-trading"); if config.ws_url.is_none() { config.ws_url = Some(MARGIN_TRADING_WS_STREAMS_PROD_URL.to_string()); } websocket_streams::WebsocketStreamsHandle::new(config) } /// Creates a WebSocket streams client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the WebSocket streams client /// /// # Returns /// /// A new WebSocket streams client configured for the production environment #[must_use] pub fn production( mut config: ConfigurationWebsocketStreams, ) -> websocket_streams::WebsocketStreamsHandle { config.ws_url = Some(MARGIN_TRADING_WS_STREAMS_PROD_URL.to_string()); MarginTradingWsStreams::from_config(config) } } src/margin_trading/rest_api/apis/mod.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod borrow_repay_api; pub use borrow_repay_api::*; pub mod market_data_api; pub use market_data_api::*; pub mod risk_data_stream_api; pub use risk_data_stream_api::*; pub mod trade_api; pub use trade_api::*; pub mod transfer_api; pub use transfer_api::*; src/margin_trading/rest_api/models/adjust_cross_margin_max_leverage_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AdjustCrossMarginMaxLeverageResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl AdjustCrossMarginMaxLeverageResponse { #[must_use] pub fn new() -> AdjustCrossMarginMaxLeverageResponse { AdjustCrossMarginMaxLeverageResponse { success: None } } } src/margin_trading/rest_api/models/create_special_key_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateSpecialKeyResponse { #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")] pub api_key: Option, #[serde(rename = "secretKey", skip_serializing_if = "Option::is_none")] pub secret_key: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, } impl CreateSpecialKeyResponse { #[must_use] pub fn new() -> CreateSpecialKeyResponse { CreateSpecialKeyResponse { api_key: None, secret_key: None, r#type: None, } } } src/margin_trading/rest_api/models/cross_margin_collateral_ratio_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CrossMarginCollateralRatioResponseInner { #[serde(rename = "collaterals", skip_serializing_if = "Option::is_none")] pub collaterals: Option>, #[serde(rename = "assetNames", skip_serializing_if = "Option::is_none")] pub asset_names: Option>, } impl CrossMarginCollateralRatioResponseInner { #[must_use] pub fn new() -> CrossMarginCollateralRatioResponseInner { CrossMarginCollateralRatioResponseInner { collaterals: None, asset_names: None, } } } src/margin_trading/rest_api/models/cross_margin_collateral_ratio_response_inner_collaterals_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CrossMarginCollateralRatioResponseInnerCollateralsInner { #[serde(rename = "minUsdValue", skip_serializing_if = "Option::is_none")] pub min_usd_value: Option, #[serde(rename = "maxUsdValue", skip_serializing_if = "Option::is_none")] pub max_usd_value: Option, #[serde(rename = "discountRate", skip_serializing_if = "Option::is_none")] pub discount_rate: Option, } impl CrossMarginCollateralRatioResponseInnerCollateralsInner { #[must_use] pub fn new() -> CrossMarginCollateralRatioResponseInnerCollateralsInner { CrossMarginCollateralRatioResponseInnerCollateralsInner { min_usd_value: None, max_usd_value: None, discount_rate: None, } } } src/margin_trading/rest_api/models/disable_isolated_margin_account_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DisableIsolatedMarginAccountResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, } impl DisableIsolatedMarginAccountResponse { #[must_use] pub fn new() -> DisableIsolatedMarginAccountResponse { DisableIsolatedMarginAccountResponse { success: None, symbol: None, } } } src/margin_trading/rest_api/models/enable_isolated_margin_account_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EnableIsolatedMarginAccountResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, } impl EnableIsolatedMarginAccountResponse { #[must_use] pub fn new() -> EnableIsolatedMarginAccountResponse { EnableIsolatedMarginAccountResponse { success: None, symbol: None, } } } src/margin_trading/rest_api/models/get_all_cross_margin_pairs_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAllCrossMarginPairsResponseInner { #[serde(rename = "base", skip_serializing_if = "Option::is_none")] pub base: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "isBuyAllowed", skip_serializing_if = "Option::is_none")] pub is_buy_allowed: Option, #[serde(rename = "isMarginTrade", skip_serializing_if = "Option::is_none")] pub is_margin_trade: Option, #[serde(rename = "isSellAllowed", skip_serializing_if = "Option::is_none")] pub is_sell_allowed: Option, #[serde(rename = "quote", skip_serializing_if = "Option::is_none")] pub quote: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "delistTime", skip_serializing_if = "Option::is_none")] pub delist_time: Option, } impl GetAllCrossMarginPairsResponseInner { #[must_use] pub fn new() -> GetAllCrossMarginPairsResponseInner { GetAllCrossMarginPairsResponseInner { base: None, id: None, is_buy_allowed: None, is_margin_trade: None, is_sell_allowed: None, quote: None, symbol: None, delist_time: None, } } } src/margin_trading/rest_api/models/get_all_isolated_margin_symbol_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAllIsolatedMarginSymbolResponseInner { #[serde(rename = "base", skip_serializing_if = "Option::is_none")] pub base: Option, #[serde(rename = "isBuyAllowed", skip_serializing_if = "Option::is_none")] pub is_buy_allowed: Option, #[serde(rename = "isMarginTrade", skip_serializing_if = "Option::is_none")] pub is_margin_trade: Option, #[serde(rename = "isSellAllowed", skip_serializing_if = "Option::is_none")] pub is_sell_allowed: Option, #[serde(rename = "quote", skip_serializing_if = "Option::is_none")] pub quote: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, } impl GetAllIsolatedMarginSymbolResponseInner { #[must_use] pub fn new() -> GetAllIsolatedMarginSymbolResponseInner { GetAllIsolatedMarginSymbolResponseInner { base: None, is_buy_allowed: None, is_margin_trade: None, is_sell_allowed: None, quote: None, symbol: None, } } } src/margin_trading/rest_api/models/get_all_margin_assets_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAllMarginAssetsResponseInner { #[serde(rename = "assetFullName", skip_serializing_if = "Option::is_none")] pub asset_full_name: Option, #[serde(rename = "assetName", skip_serializing_if = "Option::is_none")] pub asset_name: Option, #[serde(rename = "isBorrowable", skip_serializing_if = "Option::is_none")] pub is_borrowable: Option, #[serde(rename = "isMortgageable", skip_serializing_if = "Option::is_none")] pub is_mortgageable: Option, #[serde(rename = "userMinBorrow", skip_serializing_if = "Option::is_none")] pub user_min_borrow: Option, #[serde(rename = "userMinRepay", skip_serializing_if = "Option::is_none")] pub user_min_repay: Option, #[serde(rename = "delistTime", skip_serializing_if = "Option::is_none")] pub delist_time: Option, } impl GetAllMarginAssetsResponseInner { #[must_use] pub fn new() -> GetAllMarginAssetsResponseInner { GetAllMarginAssetsResponseInner { asset_full_name: None, asset_name: None, is_borrowable: None, is_mortgageable: None, user_min_borrow: None, user_min_repay: None, delist_time: None, } } } src/margin_trading/rest_api/models/get_bnb_burn_status_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBnbBurnStatusResponse { #[serde(rename = "spotBNBBurn", skip_serializing_if = "Option::is_none")] pub spot_bnb_burn: Option, #[serde(rename = "interestBNBBurn", skip_serializing_if = "Option::is_none")] pub interest_bnb_burn: Option, } impl GetBnbBurnStatusResponse { #[must_use] pub fn new() -> GetBnbBurnStatusResponse { GetBnbBurnStatusResponse { spot_bnb_burn: None, interest_bnb_burn: None, } } } src/margin_trading/rest_api/models/get_cross_margin_transfer_history_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCrossMarginTransferHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetCrossMarginTransferHistoryResponse { #[must_use] pub fn new() -> GetCrossMarginTransferHistoryResponse { GetCrossMarginTransferHistoryResponse { rows: None, total: None, } } } src/margin_trading/rest_api/models/get_cross_margin_transfer_history_response_rows_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCrossMarginTransferHistoryResponseRowsInner { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "transFrom", skip_serializing_if = "Option::is_none")] pub trans_from: Option, #[serde(rename = "transTo", skip_serializing_if = "Option::is_none")] pub trans_to: Option, #[serde(rename = "fromSymbol", skip_serializing_if = "Option::is_none")] pub from_symbol: Option, #[serde(rename = "toSymbol", skip_serializing_if = "Option::is_none")] pub to_symbol: Option, } impl GetCrossMarginTransferHistoryResponseRowsInner { #[must_use] pub fn new() -> GetCrossMarginTransferHistoryResponseRowsInner { GetCrossMarginTransferHistoryResponseRowsInner { amount: None, asset: None, status: None, timestamp: None, tx_id: None, r#type: None, trans_from: None, trans_to: None, from_symbol: None, to_symbol: None, } } } src/margin_trading/rest_api/models/get_delist_schedule_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDelistScheduleResponseInner { #[serde(rename = "delistTime", skip_serializing_if = "Option::is_none")] pub delist_time: Option, #[serde(rename = "crossMarginAssets", skip_serializing_if = "Option::is_none")] pub cross_margin_assets: Option>, #[serde( rename = "isolatedMarginSymbols", skip_serializing_if = "Option::is_none" )] pub isolated_margin_symbols: Option>, } impl GetDelistScheduleResponseInner { #[must_use] pub fn new() -> GetDelistScheduleResponseInner { GetDelistScheduleResponseInner { delist_time: None, cross_margin_assets: None, isolated_margin_symbols: None, } } } src/margin_trading/rest_api/models/get_force_liquidation_record_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetForceLiquidationRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetForceLiquidationRecordResponse { #[must_use] pub fn new() -> GetForceLiquidationRecordResponse { GetForceLiquidationRecordResponse { rows: None, total: None, } } } src/margin_trading/rest_api/models/get_force_liquidation_record_response_rows_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetForceLiquidationRecordResponseRowsInner { #[serde(rename = "avgPrice", skip_serializing_if = "Option::is_none")] pub avg_price: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "updatedTime", skip_serializing_if = "Option::is_none")] pub updated_time: Option, } impl GetForceLiquidationRecordResponseRowsInner { #[must_use] pub fn new() -> GetForceLiquidationRecordResponseRowsInner { GetForceLiquidationRecordResponseRowsInner { avg_price: None, executed_qty: None, order_id: None, price: None, qty: None, side: None, symbol: None, time_in_force: None, is_isolated: None, updated_time: None, } } } src/margin_trading/rest_api/models/get_future_hourly_interest_rate_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFutureHourlyInterestRateResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde( rename = "nextHourlyInterestRate", skip_serializing_if = "Option::is_none" )] pub next_hourly_interest_rate: Option, } impl GetFutureHourlyInterestRateResponseInner { #[must_use] pub fn new() -> GetFutureHourlyInterestRateResponseInner { GetFutureHourlyInterestRateResponseInner { asset: None, next_hourly_interest_rate: None, } } } src/margin_trading/rest_api/models/get_interest_history_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetInterestHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetInterestHistoryResponse { #[must_use] pub fn new() -> GetInterestHistoryResponse { GetInterestHistoryResponse { rows: None, total: None, } } } src/margin_trading/rest_api/models/get_interest_history_response_rows_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetInterestHistoryResponseRowsInner { #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde( rename = "interestAccuredTime", skip_serializing_if = "Option::is_none" )] pub interest_accured_time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "rawAsset", skip_serializing_if = "Option::is_none")] pub raw_asset: Option, #[serde(rename = "principal", skip_serializing_if = "Option::is_none")] pub principal: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "interestRate", skip_serializing_if = "Option::is_none")] pub interest_rate: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "isolatedSymbol", skip_serializing_if = "Option::is_none")] pub isolated_symbol: Option, } impl GetInterestHistoryResponseRowsInner { #[must_use] pub fn new() -> GetInterestHistoryResponseRowsInner { GetInterestHistoryResponseRowsInner { tx_id: None, interest_accured_time: None, asset: None, raw_asset: None, principal: None, interest: None, interest_rate: None, r#type: None, isolated_symbol: None, } } } src/margin_trading/rest_api/models/get_limit_price_pairs_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLimitPricePairsResponse { #[serde(rename = "crossMarginSymbols", skip_serializing_if = "Option::is_none")] pub cross_margin_symbols: Option>, } impl GetLimitPricePairsResponse { #[must_use] pub fn new() -> GetLimitPricePairsResponse { GetLimitPricePairsResponse { cross_margin_symbols: None, } } } src/margin_trading/rest_api/models/get_list_schedule_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetListScheduleResponseInner { #[serde(rename = "listTime", skip_serializing_if = "Option::is_none")] pub list_time: Option, #[serde(rename = "crossMarginAssets", skip_serializing_if = "Option::is_none")] pub cross_margin_assets: Option>, #[serde( rename = "isolatedMarginSymbols", skip_serializing_if = "Option::is_none" )] pub isolated_margin_symbols: Option>, } impl GetListScheduleResponseInner { #[must_use] pub fn new() -> GetListScheduleResponseInner { GetListScheduleResponseInner { list_time: None, cross_margin_assets: None, isolated_margin_symbols: None, } } } src/margin_trading/rest_api/models/get_small_liability_exchange_coin_list_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSmallLiabilityExchangeCoinListResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "principal", skip_serializing_if = "Option::is_none")] pub principal: Option, #[serde(rename = "liabilityAsset", skip_serializing_if = "Option::is_none")] pub liability_asset: Option, #[serde(rename = "liabilityQty", skip_serializing_if = "Option::is_none")] pub liability_qty: Option, } impl GetSmallLiabilityExchangeCoinListResponseInner { #[must_use] pub fn new() -> GetSmallLiabilityExchangeCoinListResponseInner { GetSmallLiabilityExchangeCoinListResponseInner { asset: None, interest: None, principal: None, liability_asset: None, liability_qty: None, } } } src/margin_trading/rest_api/models/get_small_liability_exchange_history_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSmallLiabilityExchangeHistoryResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, } impl GetSmallLiabilityExchangeHistoryResponse { #[must_use] pub fn new() -> GetSmallLiabilityExchangeHistoryResponse { GetSmallLiabilityExchangeHistoryResponse { total: None, rows: None, } } } src/margin_trading/rest_api/models/get_small_liability_exchange_history_response_rows_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSmallLiabilityExchangeHistoryResponseRowsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "targetAsset", skip_serializing_if = "Option::is_none")] pub target_asset: Option, #[serde(rename = "targetAmount", skip_serializing_if = "Option::is_none")] pub target_amount: Option, #[serde(rename = "bizType", skip_serializing_if = "Option::is_none")] pub biz_type: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl GetSmallLiabilityExchangeHistoryResponseRowsInner { #[must_use] pub fn new() -> GetSmallLiabilityExchangeHistoryResponseRowsInner { GetSmallLiabilityExchangeHistoryResponseRowsInner { asset: None, amount: None, target_asset: None, target_amount: None, biz_type: None, timestamp: None, } } } src/margin_trading/rest_api/models/get_summary_of_margin_account_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSummaryOfMarginAccountResponse { #[serde(rename = "normalBar", skip_serializing_if = "Option::is_none")] pub normal_bar: Option, #[serde(rename = "marginCallBar", skip_serializing_if = "Option::is_none")] pub margin_call_bar: Option, #[serde( rename = "forceLiquidationBar", skip_serializing_if = "Option::is_none" )] pub force_liquidation_bar: Option, } impl GetSummaryOfMarginAccountResponse { #[must_use] pub fn new() -> GetSummaryOfMarginAccountResponse { GetSummaryOfMarginAccountResponse { normal_bar: None, margin_call_bar: None, force_liquidation_bar: None, } } } src/margin_trading/rest_api/models/margin_account_borrow_repay_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountBorrowRepayResponse { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl MarginAccountBorrowRepayResponse { #[must_use] pub fn new() -> MarginAccountBorrowRepayResponse { MarginAccountBorrowRepayResponse { tran_id: None } } } src/margin_trading/rest_api/models/margin_account_cancel_all_open_orders_on_a_symbol_response_inner_order_reports_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, } impl MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner { #[must_use] pub fn new() -> MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner { MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrderReportsInner { symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, iceberg_qty: None, } } } src/margin_trading/rest_api/models/margin_account_cancel_all_open_orders_on_a_symbol_response_inner_orders_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner { #[must_use] pub fn new() -> MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner { MarginAccountCancelAllOpenOrdersOnASymbolResponseInnerOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/margin_trading/rest_api/models/margin_account_cancel_oco_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountCancelOcoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl MarginAccountCancelOcoResponse { #[must_use] pub fn new() -> MarginAccountCancelOcoResponse { MarginAccountCancelOcoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, is_isolated: None, orders: None, order_reports: None, } } } src/margin_trading/rest_api/models/margin_account_cancel_oco_response_order_reports_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountCancelOcoResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl MarginAccountCancelOcoResponseOrderReportsInner { #[must_use] pub fn new() -> MarginAccountCancelOcoResponseOrderReportsInner { MarginAccountCancelOcoResponseOrderReportsInner { symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, self_trade_prevention_mode: None, } } } src/margin_trading/rest_api/models/margin_account_cancel_oco_response_orders_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountCancelOcoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl MarginAccountCancelOcoResponseOrdersInner { #[must_use] pub fn new() -> MarginAccountCancelOcoResponseOrdersInner { MarginAccountCancelOcoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/margin_trading/rest_api/models/margin_account_cancel_order_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountCancelOrderResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, } impl MarginAccountCancelOrderResponse { #[must_use] pub fn new() -> MarginAccountCancelOrderResponse { MarginAccountCancelOrderResponse { symbol: None, is_isolated: None, order_id: None, orig_client_order_id: None, client_order_id: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, } } } src/margin_trading/rest_api/models/margin_account_new_oco_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOcoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde( rename = "marginBuyBorrowAmount", skip_serializing_if = "Option::is_none" )] pub margin_buy_borrow_amount: Option, #[serde( rename = "marginBuyBorrowAsset", skip_serializing_if = "Option::is_none" )] pub margin_buy_borrow_asset: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl MarginAccountNewOcoResponse { #[must_use] pub fn new() -> MarginAccountNewOcoResponse { MarginAccountNewOcoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, margin_buy_borrow_amount: None, margin_buy_borrow_asset: None, is_isolated: None, orders: None, order_reports: None, } } } src/margin_trading/rest_api/models/margin_account_new_oco_response_order_reports_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOcoResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl MarginAccountNewOcoResponseOrderReportsInner { #[must_use] pub fn new() -> MarginAccountNewOcoResponseOrderReportsInner { MarginAccountNewOcoResponseOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, self_trade_prevention_mode: None, } } } src/margin_trading/rest_api/models/margin_account_new_oco_response_orders_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOcoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl MarginAccountNewOcoResponseOrdersInner { #[must_use] pub fn new() -> MarginAccountNewOcoResponseOrdersInner { MarginAccountNewOcoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/margin_trading/rest_api/models/margin_account_new_order_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOrderResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde( rename = "marginBuyBorrowAmount", skip_serializing_if = "Option::is_none" )] pub margin_buy_borrow_amount: Option, #[serde( rename = "marginBuyBorrowAsset", skip_serializing_if = "Option::is_none" )] pub margin_buy_borrow_asset: Option, #[serde(rename = "fills", skip_serializing_if = "Option::is_none")] pub fills: Option>, } impl MarginAccountNewOrderResponse { #[must_use] pub fn new() -> MarginAccountNewOrderResponse { MarginAccountNewOrderResponse { symbol: None, order_id: None, client_order_id: None, is_isolated: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, self_trade_prevention_mode: None, margin_buy_borrow_amount: None, margin_buy_borrow_asset: None, fills: None, } } } src/margin_trading/rest_api/models/margin_account_new_order_response_fills_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOrderResponseFillsInner { #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, } impl MarginAccountNewOrderResponseFillsInner { #[must_use] pub fn new() -> MarginAccountNewOrderResponseFillsInner { MarginAccountNewOrderResponseFillsInner { price: None, qty: None, commission: None, commission_asset: None, trade_id: None, } } } src/margin_trading/rest_api/models/margin_account_new_oto_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOtoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl MarginAccountNewOtoResponse { #[must_use] pub fn new() -> MarginAccountNewOtoResponse { MarginAccountNewOtoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, is_isolated: None, orders: None, order_reports: None, } } } src/margin_trading/rest_api/models/margin_account_new_oto_response_order_reports_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOtoResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl MarginAccountNewOtoResponseOrderReportsInner { #[must_use] pub fn new() -> MarginAccountNewOtoResponseOrderReportsInner { MarginAccountNewOtoResponseOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, self_trade_prevention_mode: None, } } } src/margin_trading/rest_api/models/margin_account_new_oto_response_orders_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOtoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl MarginAccountNewOtoResponseOrdersInner { #[must_use] pub fn new() -> MarginAccountNewOtoResponseOrdersInner { MarginAccountNewOtoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/margin_trading/rest_api/models/margin_account_new_otoco_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOtocoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl MarginAccountNewOtocoResponse { #[must_use] pub fn new() -> MarginAccountNewOtocoResponse { MarginAccountNewOtocoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, is_isolated: None, orders: None, order_reports: None, } } } src/margin_trading/rest_api/models/margin_account_new_otoco_response_order_reports_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOtocoResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, } impl MarginAccountNewOtocoResponseOrderReportsInner { #[must_use] pub fn new() -> MarginAccountNewOtocoResponseOrderReportsInner { MarginAccountNewOtocoResponseOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, self_trade_prevention_mode: None, stop_price: None, } } } src/margin_trading/rest_api/models/margin_account_new_otoco_response_orders_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginAccountNewOtocoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl MarginAccountNewOtocoResponseOrdersInner { #[must_use] pub fn new() -> MarginAccountNewOtocoResponseOrdersInner { MarginAccountNewOtocoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/margin_trading/rest_api/models/margin_manual_liquidation_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginManualLiquidationResponse { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "principal", skip_serializing_if = "Option::is_none")] pub principal: Option, #[serde(rename = "liabilityAsset", skip_serializing_if = "Option::is_none")] pub liability_asset: Option, #[serde(rename = "liabilityQty", skip_serializing_if = "Option::is_none")] pub liability_qty: Option, } impl MarginManualLiquidationResponse { #[must_use] pub fn new() -> MarginManualLiquidationResponse { MarginManualLiquidationResponse { asset: None, interest: None, principal: None, liability_asset: None, liability_qty: None, } } } src/margin_trading/rest_api/models/query_borrow_repay_records_in_margin_account_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryBorrowRepayRecordsInMarginAccountResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl QueryBorrowRepayRecordsInMarginAccountResponse { #[must_use] pub fn new() -> QueryBorrowRepayRecordsInMarginAccountResponse { QueryBorrowRepayRecordsInMarginAccountResponse { rows: None, total: None, } } } src/margin_trading/rest_api/models/query_borrow_repay_records_in_margin_account_response_rows_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryBorrowRepayRecordsInMarginAccountResponseRowsInner { #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "isolatedSymbol", skip_serializing_if = "Option::is_none")] pub isolated_symbol: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "principal", skip_serializing_if = "Option::is_none")] pub principal: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, } impl QueryBorrowRepayRecordsInMarginAccountResponseRowsInner { #[must_use] pub fn new() -> QueryBorrowRepayRecordsInMarginAccountResponseRowsInner { QueryBorrowRepayRecordsInMarginAccountResponseRowsInner { r#type: None, isolated_symbol: None, amount: None, asset: None, interest: None, principal: None, status: None, timestamp: None, tx_id: None, } } } src/margin_trading/rest_api/models/query_cross_isolated_margin_capital_flow_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCrossIsolatedMarginCapitalFlowResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, } impl QueryCrossIsolatedMarginCapitalFlowResponseInner { #[must_use] pub fn new() -> QueryCrossIsolatedMarginCapitalFlowResponseInner { QueryCrossIsolatedMarginCapitalFlowResponseInner { id: None, tran_id: None, timestamp: None, asset: None, symbol: None, r#type: None, amount: None, } } } src/margin_trading/rest_api/models/query_cross_margin_account_details_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCrossMarginAccountDetailsResponse { #[serde(rename = "created", skip_serializing_if = "Option::is_none")] pub created: Option, #[serde(rename = "borrowEnabled", skip_serializing_if = "Option::is_none")] pub borrow_enabled: Option, #[serde(rename = "marginLevel", skip_serializing_if = "Option::is_none")] pub margin_level: Option, #[serde( rename = "collateralMarginLevel", skip_serializing_if = "Option::is_none" )] pub collateral_margin_level: Option, #[serde(rename = "totalAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_asset_of_btc: Option, #[serde( rename = "totalLiabilityOfBtc", skip_serializing_if = "Option::is_none" )] pub total_liability_of_btc: Option, #[serde(rename = "totalNetAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_net_asset_of_btc: Option, #[serde( rename = "TotalCollateralValueInUSDT", skip_serializing_if = "Option::is_none" )] pub total_collateral_value_in_usdt: Option, #[serde( rename = "totalOpenOrderLossInUSDT", skip_serializing_if = "Option::is_none" )] pub total_open_order_loss_in_usdt: Option, #[serde(rename = "tradeEnabled", skip_serializing_if = "Option::is_none")] pub trade_enabled: Option, #[serde(rename = "transferInEnabled", skip_serializing_if = "Option::is_none")] pub transfer_in_enabled: Option, #[serde(rename = "transferOutEnabled", skip_serializing_if = "Option::is_none")] pub transfer_out_enabled: Option, #[serde(rename = "accountType", skip_serializing_if = "Option::is_none")] pub account_type: Option, #[serde(rename = "userAssets", skip_serializing_if = "Option::is_none")] pub user_assets: Option>, } impl QueryCrossMarginAccountDetailsResponse { #[must_use] pub fn new() -> QueryCrossMarginAccountDetailsResponse { QueryCrossMarginAccountDetailsResponse { created: None, borrow_enabled: None, margin_level: None, collateral_margin_level: None, total_asset_of_btc: None, total_liability_of_btc: None, total_net_asset_of_btc: None, total_collateral_value_in_usdt: None, total_open_order_loss_in_usdt: None, trade_enabled: None, transfer_in_enabled: None, transfer_out_enabled: None, account_type: None, user_assets: None, } } } src/margin_trading/rest_api/models/query_cross_margin_account_details_response_user_assets_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCrossMarginAccountDetailsResponseUserAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "borrowed", skip_serializing_if = "Option::is_none")] pub borrowed: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "netAsset", skip_serializing_if = "Option::is_none")] pub net_asset: Option, } impl QueryCrossMarginAccountDetailsResponseUserAssetsInner { #[must_use] pub fn new() -> QueryCrossMarginAccountDetailsResponseUserAssetsInner { QueryCrossMarginAccountDetailsResponseUserAssetsInner { asset: None, borrowed: None, free: None, interest: None, locked: None, net_asset: None, } } } src/margin_trading/rest_api/models/query_cross_margin_fee_data_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCrossMarginFeeDataResponseInner { #[serde(rename = "vipLevel", skip_serializing_if = "Option::is_none")] pub vip_level: Option, #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "transferIn", skip_serializing_if = "Option::is_none")] pub transfer_in: Option, #[serde(rename = "borrowable", skip_serializing_if = "Option::is_none")] pub borrowable: Option, #[serde(rename = "dailyInterest", skip_serializing_if = "Option::is_none")] pub daily_interest: Option, #[serde(rename = "yearlyInterest", skip_serializing_if = "Option::is_none")] pub yearly_interest: Option, #[serde(rename = "borrowLimit", skip_serializing_if = "Option::is_none")] pub borrow_limit: Option, #[serde(rename = "marginablePairs", skip_serializing_if = "Option::is_none")] pub marginable_pairs: Option>, } impl QueryCrossMarginFeeDataResponseInner { #[must_use] pub fn new() -> QueryCrossMarginFeeDataResponseInner { QueryCrossMarginFeeDataResponseInner { vip_level: None, coin: None, transfer_in: None, borrowable: None, daily_interest: None, yearly_interest: None, borrow_limit: None, marginable_pairs: None, } } } src/margin_trading/rest_api/models/query_current_margin_order_count_usage_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryCurrentMarginOrderCountUsageResponseInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl QueryCurrentMarginOrderCountUsageResponseInner { #[must_use] pub fn new() -> QueryCurrentMarginOrderCountUsageResponseInner { QueryCurrentMarginOrderCountUsageResponseInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/margin_trading/rest_api/models/query_enabled_isolated_margin_account_limit_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryEnabledIsolatedMarginAccountLimitResponse { #[serde(rename = "enabledAccount", skip_serializing_if = "Option::is_none")] pub enabled_account: Option, #[serde(rename = "maxAccount", skip_serializing_if = "Option::is_none")] pub max_account: Option, } impl QueryEnabledIsolatedMarginAccountLimitResponse { #[must_use] pub fn new() -> QueryEnabledIsolatedMarginAccountLimitResponse { QueryEnabledIsolatedMarginAccountLimitResponse { enabled_account: None, max_account: None, } } } src/margin_trading/rest_api/models/query_isolated_margin_account_info_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIsolatedMarginAccountInfoResponse { #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "totalAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_asset_of_btc: Option, #[serde( rename = "totalLiabilityOfBtc", skip_serializing_if = "Option::is_none" )] pub total_liability_of_btc: Option, #[serde(rename = "totalNetAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_net_asset_of_btc: Option, } impl QueryIsolatedMarginAccountInfoResponse { #[must_use] pub fn new() -> QueryIsolatedMarginAccountInfoResponse { QueryIsolatedMarginAccountInfoResponse { assets: None, total_asset_of_btc: None, total_liability_of_btc: None, total_net_asset_of_btc: None, } } } src/margin_trading/rest_api/models/query_isolated_margin_account_info_response_assets_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIsolatedMarginAccountInfoResponseAssetsInner { #[serde(rename = "baseAsset", skip_serializing_if = "Option::is_none")] pub base_asset: Option>, #[serde(rename = "quoteAsset", skip_serializing_if = "Option::is_none")] pub quote_asset: Option>, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isolatedCreated", skip_serializing_if = "Option::is_none")] pub isolated_created: Option, #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] pub enabled: Option, #[serde(rename = "marginLevel", skip_serializing_if = "Option::is_none")] pub margin_level: Option, #[serde(rename = "marginLevelStatus", skip_serializing_if = "Option::is_none")] pub margin_level_status: Option, #[serde(rename = "marginRatio", skip_serializing_if = "Option::is_none")] pub margin_ratio: Option, #[serde(rename = "indexPrice", skip_serializing_if = "Option::is_none")] pub index_price: Option, #[serde(rename = "liquidatePrice", skip_serializing_if = "Option::is_none")] pub liquidate_price: Option, #[serde(rename = "liquidateRate", skip_serializing_if = "Option::is_none")] pub liquidate_rate: Option, #[serde(rename = "tradeEnabled", skip_serializing_if = "Option::is_none")] pub trade_enabled: Option, } impl QueryIsolatedMarginAccountInfoResponseAssetsInner { #[must_use] pub fn new() -> QueryIsolatedMarginAccountInfoResponseAssetsInner { QueryIsolatedMarginAccountInfoResponseAssetsInner { base_asset: None, quote_asset: None, symbol: None, isolated_created: None, enabled: None, margin_level: None, margin_level_status: None, margin_ratio: None, index_price: None, liquidate_price: None, liquidate_rate: None, trade_enabled: None, } } } src/margin_trading/rest_api/models/query_isolated_margin_account_info_response_assets_inner_base_asset.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "borrowEnabled", skip_serializing_if = "Option::is_none")] pub borrow_enabled: Option, #[serde(rename = "borrowed", skip_serializing_if = "Option::is_none")] pub borrowed: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "netAsset", skip_serializing_if = "Option::is_none")] pub net_asset: Option, #[serde(rename = "netAssetOfBtc", skip_serializing_if = "Option::is_none")] pub net_asset_of_btc: Option, #[serde(rename = "repayEnabled", skip_serializing_if = "Option::is_none")] pub repay_enabled: Option, #[serde(rename = "totalAsset", skip_serializing_if = "Option::is_none")] pub total_asset: Option, } impl QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset { #[must_use] pub fn new() -> QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset { QueryIsolatedMarginAccountInfoResponseAssetsInnerBaseAsset { asset: None, borrow_enabled: None, borrowed: None, free: None, interest: None, locked: None, net_asset: None, net_asset_of_btc: None, repay_enabled: None, total_asset: None, } } } src/margin_trading/rest_api/models/query_isolated_margin_account_info_response_assets_inner_quote_asset.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "borrowEnabled", skip_serializing_if = "Option::is_none")] pub borrow_enabled: Option, #[serde(rename = "borrowed", skip_serializing_if = "Option::is_none")] pub borrowed: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "netAsset", skip_serializing_if = "Option::is_none")] pub net_asset: Option, #[serde(rename = "netAssetOfBtc", skip_serializing_if = "Option::is_none")] pub net_asset_of_btc: Option, #[serde(rename = "repayEnabled", skip_serializing_if = "Option::is_none")] pub repay_enabled: Option, #[serde(rename = "totalAsset", skip_serializing_if = "Option::is_none")] pub total_asset: Option, } impl QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset { #[must_use] pub fn new() -> QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset { QueryIsolatedMarginAccountInfoResponseAssetsInnerQuoteAsset { asset: None, borrow_enabled: None, borrowed: None, free: None, interest: None, locked: None, net_asset: None, net_asset_of_btc: None, repay_enabled: None, total_asset: None, } } } src/margin_trading/rest_api/models/query_isolated_margin_fee_data_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIsolatedMarginFeeDataResponseInner { #[serde(rename = "vipLevel", skip_serializing_if = "Option::is_none")] pub vip_level: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl QueryIsolatedMarginFeeDataResponseInner { #[must_use] pub fn new() -> QueryIsolatedMarginFeeDataResponseInner { QueryIsolatedMarginFeeDataResponseInner { vip_level: None, symbol: None, leverage: None, data: None, } } } src/margin_trading/rest_api/models/query_isolated_margin_fee_data_response_inner_data_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIsolatedMarginFeeDataResponseInnerDataInner { #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "dailyInterest", skip_serializing_if = "Option::is_none")] pub daily_interest: Option, #[serde(rename = "borrowLimit", skip_serializing_if = "Option::is_none")] pub borrow_limit: Option, } impl QueryIsolatedMarginFeeDataResponseInnerDataInner { #[must_use] pub fn new() -> QueryIsolatedMarginFeeDataResponseInnerDataInner { QueryIsolatedMarginFeeDataResponseInnerDataInner { coin: None, daily_interest: None, borrow_limit: None, } } } src/margin_trading/rest_api/models/query_isolated_margin_tier_data_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryIsolatedMarginTierDataResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] pub tier: Option, #[serde(rename = "effectiveMultiple", skip_serializing_if = "Option::is_none")] pub effective_multiple: Option, #[serde(rename = "initialRiskRatio", skip_serializing_if = "Option::is_none")] pub initial_risk_ratio: Option, #[serde( rename = "liquidationRiskRatio", skip_serializing_if = "Option::is_none" )] pub liquidation_risk_ratio: Option, #[serde( rename = "baseAssetMaxBorrowable", skip_serializing_if = "Option::is_none" )] pub base_asset_max_borrowable: Option, #[serde( rename = "quoteAssetMaxBorrowable", skip_serializing_if = "Option::is_none" )] pub quote_asset_max_borrowable: Option, } impl QueryIsolatedMarginTierDataResponseInner { #[must_use] pub fn new() -> QueryIsolatedMarginTierDataResponseInner { QueryIsolatedMarginTierDataResponseInner { symbol: None, tier: None, effective_multiple: None, initial_risk_ratio: None, liquidation_risk_ratio: None, base_asset_max_borrowable: None, quote_asset_max_borrowable: None, } } } src/margin_trading/rest_api/models/query_liability_coin_leverage_bracket_in_cross_margin_pro_mode_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner { #[serde(rename = "assetNames", skip_serializing_if = "Option::is_none")] pub asset_names: Option>, #[serde(rename = "rank", skip_serializing_if = "Option::is_none")] pub rank: Option, #[serde(rename = "brackets", skip_serializing_if = "Option::is_none")] pub brackets: Option< Vec< models::QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner, >, >, } impl QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner { #[must_use] pub fn new() -> QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner { QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInner { asset_names: None, rank: None, brackets: None, } } } src/margin_trading/rest_api/models/query_liability_coin_leverage_bracket_in_cross_margin_pro_mode_response_inner_brackets_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner { #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "maxDebt", skip_serializing_if = "Option::is_none")] pub max_debt: Option, #[serde( rename = "maintenanceMarginRate", skip_serializing_if = "Option::is_none" )] pub maintenance_margin_rate: Option, #[serde(rename = "initialMarginRate", skip_serializing_if = "Option::is_none")] pub initial_margin_rate: Option, #[serde(rename = "fastNum", skip_serializing_if = "Option::is_none")] pub fast_num: Option, } impl QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner { #[must_use] pub fn new() -> QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner { QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponseInnerBracketsInner { leverage: None, max_debt: None, maintenance_margin_rate: None, initial_margin_rate: None, fast_num: None, } } } src/margin_trading/rest_api/models/query_margin_accounts_all_oco_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsAllOcoResponseInner { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl QueryMarginAccountsAllOcoResponseInner { #[must_use] pub fn new() -> QueryMarginAccountsAllOcoResponseInner { QueryMarginAccountsAllOcoResponseInner { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, is_isolated: None, orders: None, } } } src/margin_trading/rest_api/models/query_margin_accounts_all_oco_response_inner_orders_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsAllOcoResponseInnerOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl QueryMarginAccountsAllOcoResponseInnerOrdersInner { #[must_use] pub fn new() -> QueryMarginAccountsAllOcoResponseInnerOrdersInner { QueryMarginAccountsAllOcoResponseInnerOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/margin_trading/rest_api/models/query_margin_accounts_all_orders_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsAllOrdersResponseInner { #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, #[serde(rename = "isWorking", skip_serializing_if = "Option::is_none")] pub is_working: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryMarginAccountsAllOrdersResponseInner { #[must_use] pub fn new() -> QueryMarginAccountsAllOrdersResponseInner { QueryMarginAccountsAllOrdersResponseInner { client_order_id: None, cummulative_quote_qty: None, executed_qty: None, iceberg_qty: None, is_working: None, order_id: None, orig_qty: None, price: None, side: None, status: None, stop_price: None, symbol: None, is_isolated: None, time: None, time_in_force: None, r#type: None, self_trade_prevention_mode: None, update_time: None, } } } src/margin_trading/rest_api/models/query_margin_accounts_oco_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsOcoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl QueryMarginAccountsOcoResponse { #[must_use] pub fn new() -> QueryMarginAccountsOcoResponse { QueryMarginAccountsOcoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, is_isolated: None, orders: None, } } } src/margin_trading/rest_api/models/query_margin_accounts_oco_response_orders_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsOcoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl QueryMarginAccountsOcoResponseOrdersInner { #[must_use] pub fn new() -> QueryMarginAccountsOcoResponseOrdersInner { QueryMarginAccountsOcoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/margin_trading/rest_api/models/query_margin_accounts_open_oco_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsOpenOcoResponseInner { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl QueryMarginAccountsOpenOcoResponseInner { #[must_use] pub fn new() -> QueryMarginAccountsOpenOcoResponseInner { QueryMarginAccountsOpenOcoResponseInner { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, is_isolated: None, orders: None, } } } src/margin_trading/rest_api/models/query_margin_accounts_open_oco_response_inner_orders_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsOpenOcoResponseInnerOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl QueryMarginAccountsOpenOcoResponseInnerOrdersInner { #[must_use] pub fn new() -> QueryMarginAccountsOpenOcoResponseInnerOrdersInner { QueryMarginAccountsOpenOcoResponseInnerOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/margin_trading/rest_api/models/query_margin_accounts_open_orders_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsOpenOrdersResponseInner { #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, #[serde(rename = "isWorking", skip_serializing_if = "Option::is_none")] pub is_working: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryMarginAccountsOpenOrdersResponseInner { #[must_use] pub fn new() -> QueryMarginAccountsOpenOrdersResponseInner { QueryMarginAccountsOpenOrdersResponseInner { client_order_id: None, cummulative_quote_qty: None, executed_qty: None, iceberg_qty: None, is_working: None, order_id: None, orig_qty: None, price: None, side: None, status: None, stop_price: None, symbol: None, is_isolated: None, time: None, time_in_force: None, r#type: None, self_trade_prevention_mode: None, update_time: None, } } } src/margin_trading/rest_api/models/query_margin_accounts_order_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsOrderResponse { #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, #[serde(rename = "isWorking", skip_serializing_if = "Option::is_none")] pub is_working: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryMarginAccountsOrderResponse { #[must_use] pub fn new() -> QueryMarginAccountsOrderResponse { QueryMarginAccountsOrderResponse { client_order_id: None, cummulative_quote_qty: None, executed_qty: None, iceberg_qty: None, is_working: None, order_id: None, orig_qty: None, price: None, side: None, status: None, stop_price: None, symbol: None, is_isolated: None, time: None, time_in_force: None, r#type: None, self_trade_prevention_mode: None, update_time: None, } } } src/margin_trading/rest_api/models/query_margin_accounts_trade_list_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAccountsTradeListResponseInner { #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "isBestMatch", skip_serializing_if = "Option::is_none")] pub is_best_match: Option, #[serde(rename = "isBuyer", skip_serializing_if = "Option::is_none")] pub is_buyer: Option, #[serde(rename = "isMaker", skip_serializing_if = "Option::is_none")] pub is_maker: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "isIsolated", skip_serializing_if = "Option::is_none")] pub is_isolated: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl QueryMarginAccountsTradeListResponseInner { #[must_use] pub fn new() -> QueryMarginAccountsTradeListResponseInner { QueryMarginAccountsTradeListResponseInner { commission: None, commission_asset: None, id: None, is_best_match: None, is_buyer: None, is_maker: None, order_id: None, price: None, qty: None, symbol: None, is_isolated: None, time: None, } } } src/margin_trading/rest_api/models/query_margin_available_inventory_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAvailableInventoryResponse { #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryMarginAvailableInventoryResponse { #[must_use] pub fn new() -> QueryMarginAvailableInventoryResponse { QueryMarginAvailableInventoryResponse { assets: None, update_time: None, } } } src/margin_trading/rest_api/models/query_margin_available_inventory_response_assets.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginAvailableInventoryResponseAssets { #[serde(rename = "MATIC", skip_serializing_if = "Option::is_none")] pub matic: Option, #[serde(rename = "STPT", skip_serializing_if = "Option::is_none")] pub stpt: Option, #[serde(rename = "TVK", skip_serializing_if = "Option::is_none")] pub tvk: Option, #[serde(rename = "SHIB", skip_serializing_if = "Option::is_none")] pub shib: Option, } impl QueryMarginAvailableInventoryResponseAssets { #[must_use] pub fn new() -> QueryMarginAvailableInventoryResponseAssets { QueryMarginAvailableInventoryResponseAssets { matic: None, stpt: None, tvk: None, shib: None, } } } src/margin_trading/rest_api/models/query_margin_interest_rate_history_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginInterestRateHistoryResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "dailyInterestRate", skip_serializing_if = "Option::is_none")] pub daily_interest_rate: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, #[serde(rename = "vipLevel", skip_serializing_if = "Option::is_none")] pub vip_level: Option, } impl QueryMarginInterestRateHistoryResponseInner { #[must_use] pub fn new() -> QueryMarginInterestRateHistoryResponseInner { QueryMarginInterestRateHistoryResponseInner { asset: None, daily_interest_rate: None, timestamp: None, vip_level: None, } } } src/margin_trading/rest_api/models/query_margin_priceindex_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMarginPriceindexResponse { #[serde(rename = "calcTime", skip_serializing_if = "Option::is_none")] pub calc_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, } impl QueryMarginPriceindexResponse { #[must_use] pub fn new() -> QueryMarginPriceindexResponse { QueryMarginPriceindexResponse { calc_time: None, price: None, symbol: None, } } } src/margin_trading/rest_api/models/query_max_borrow_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMaxBorrowResponse { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "borrowLimit", skip_serializing_if = "Option::is_none")] pub borrow_limit: Option, } impl QueryMaxBorrowResponse { #[must_use] pub fn new() -> QueryMaxBorrowResponse { QueryMaxBorrowResponse { amount: None, borrow_limit: None, } } } src/margin_trading/rest_api/models/query_max_transfer_out_amount_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryMaxTransferOutAmountResponse { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, } impl QueryMaxTransferOutAmountResponse { #[must_use] pub fn new() -> QueryMaxTransferOutAmountResponse { QueryMaxTransferOutAmountResponse { amount: None } } } src/margin_trading/rest_api/models/query_special_key_list_response_inner.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySpecialKeyListResponseInner { #[serde(rename = "apiName", skip_serializing_if = "Option::is_none")] pub api_name: Option, #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")] pub api_key: Option, #[serde(rename = "ip", skip_serializing_if = "Option::is_none")] pub ip: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "permissionMode", skip_serializing_if = "Option::is_none")] pub permission_mode: Option, } impl QuerySpecialKeyListResponseInner { #[must_use] pub fn new() -> QuerySpecialKeyListResponseInner { QuerySpecialKeyListResponseInner { api_name: None, api_key: None, ip: None, r#type: None, permission_mode: None, } } } src/margin_trading/rest_api/models/query_special_key_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySpecialKeyResponse { #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")] pub api_key: Option, #[serde(rename = "ip", skip_serializing_if = "Option::is_none")] pub ip: Option, #[serde(rename = "apiName", skip_serializing_if = "Option::is_none")] pub api_name: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "permissionMode", skip_serializing_if = "Option::is_none")] pub permission_mode: Option, } impl QuerySpecialKeyResponse { #[must_use] pub fn new() -> QuerySpecialKeyResponse { QuerySpecialKeyResponse { api_key: None, ip: None, api_name: None, r#type: None, permission_mode: None, } } } src/margin_trading/rest_api/models/start_user_data_stream_response.rs /* * Binance Margin Trading REST API * * OpenAPI Specification for the Binance Margin Trading REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StartUserDataStreamResponse { #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl StartUserDataStreamResponse { #[must_use] pub fn new() -> StartUserDataStreamResponse { StartUserDataStreamResponse { listen_key: None } } } src/margin_trading/websocket_streams/apis/mod.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ src/margin_trading/websocket_streams/handle.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ use crate::{common::config::ConfigurationWebsocketStreams, models::WebsocketStreamsConnectConfig}; use super::WebsocketStreams; #[derive(Clone)] pub struct WebsocketStreamsHandle { configuration: ConfigurationWebsocketStreams, } impl WebsocketStreamsHandle { #[must_use] pub fn new(configuration: ConfigurationWebsocketStreams) -> Self { Self { configuration } } /// Connects to a WebSocket stream using default configuration. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let streams = handle.connect().await?; /// pub async fn connect(&self) -> anyhow::Result { self.connect_with_config(Default::default()).await } /// Connects to a WebSocket stream with a custom configuration. /// /// # Arguments /// /// * `cfg` - A configuration object specifying connection details for the WebSocket stream. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let `custom_config` = `WebsocketStreamsConnectConfig::default()`; /// let streams = `handle.connect_with_config(custom_config).await`?; /// pub async fn connect_with_config( &self, cfg: WebsocketStreamsConnectConfig, ) -> anyhow::Result { WebsocketStreams::connect(self.configuration.clone(), cfg.streams, cfg.mode).await } } src/margin_trading/websocket_streams/models/balanceupdate.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Balanceupdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "d", skip_serializing_if = "Option::is_none")] pub d: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl Balanceupdate { #[must_use] pub fn new() -> Balanceupdate { Balanceupdate { e_uppercase: None, a: None, d: None, t_uppercase: None, } } } src/margin_trading/websocket_streams/models/listenkeyexpired.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Listenkeyexpired { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "listenKey", skip_serializing_if = "Option::is_none")] pub listen_key: Option, } impl Listenkeyexpired { #[must_use] pub fn new() -> Listenkeyexpired { Listenkeyexpired { e_uppercase: None, listen_key: None, } } } src/margin_trading/websocket_streams/models/liststatus.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Liststatus { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "g", skip_serializing_if = "Option::is_none")] pub g: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option>, } impl Liststatus { #[must_use] pub fn new() -> Liststatus { Liststatus { e_uppercase: None, s: None, g: None, c: None, l: None, l_uppercase: None, r: None, c_uppercase: None, t_uppercase: None, o_uppercase: None, } } } src/margin_trading/websocket_streams/models/liststatus_o_inner.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ListstatusOInner { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, } impl ListstatusOInner { #[must_use] pub fn new() -> ListstatusOInner { ListstatusOInner { s: None, i: None, c: None, } } } src/margin_trading/websocket_streams/models/margin_level_status_change.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginLevelStatusChange { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, } impl MarginLevelStatusChange { #[must_use] pub fn new() -> MarginLevelStatusChange { MarginLevelStatusChange { e_uppercase: None, l: None, s: None, } } } src/margin_trading/websocket_streams/models/mod.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod balanceupdate; pub use self::balanceupdate::Balanceupdate; pub mod executionreport; pub use self::executionreport::Executionreport; pub mod listenkeyexpired; pub use self::listenkeyexpired::Listenkeyexpired; pub mod liststatus; pub use self::liststatus::Liststatus; pub mod liststatus_o_inner; pub use self::liststatus_o_inner::ListstatusOInner; pub mod margin_level_status_change; pub use self::margin_level_status_change::MarginLevelStatusChange; pub mod outboundaccountposition; pub use self::outboundaccountposition::Outboundaccountposition; pub mod outboundaccountposition_b_inner; pub use self::outboundaccountposition_b_inner::OutboundaccountpositionBInner; pub mod risk_data_stream_events_response; pub use self::risk_data_stream_events_response::RiskDataStreamEventsResponse; pub mod trade_data_stream_events_response; pub use self::trade_data_stream_events_response::TradeDataStreamEventsResponse; pub mod user_liability_change; pub use self::user_liability_change::UserLiabilityChange; src/margin_trading/websocket_streams/models/outboundaccountposition.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Outboundaccountposition { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option>, } impl Outboundaccountposition { #[must_use] pub fn new() -> Outboundaccountposition { Outboundaccountposition { e_uppercase: None, u: None, b_uppercase: None, } } } src/margin_trading/websocket_streams/models/outboundaccountposition_b_inner.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OutboundaccountpositionBInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, } impl OutboundaccountpositionBInner { #[must_use] pub fn new() -> OutboundaccountpositionBInner { OutboundaccountpositionBInner { a: None, f: None, l: None, } } } src/margin_trading/websocket_streams/models/risk_data_stream_events_response.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(try_from = "Value")] pub enum RiskDataStreamEventsResponse { #[serde(rename = "USER_LIABILITY_CHANGE")] UserLiabilityChange(Box), #[serde(rename = "MARGIN_LEVEL_STATUS_CHANGE")] MarginLevelStatusChange(Box), Other(serde_json::Value), } impl Default for RiskDataStreamEventsResponse { fn default() -> Self { Self::UserLiabilityChange(Default::default()) } } impl TryFrom for RiskDataStreamEventsResponse { type Error = serde_json::Error; fn try_from(v: Value) -> Result { let tag = v .get("e") .and_then(Value::as_str) .ok_or_else(|| serde_json::Error::custom("missing field `e`"))?; match tag { "USER_LIABILITY_CHANGE" => { let payload = serde_json::from_value(v)?; Ok(RiskDataStreamEventsResponse::UserLiabilityChange(Box::new( payload, ))) } "MARGIN_LEVEL_STATUS_CHANGE" => { let payload = serde_json::from_value(v)?; Ok(RiskDataStreamEventsResponse::MarginLevelStatusChange( Box::new(payload), )) } _ => Ok(RiskDataStreamEventsResponse::Other(v)), } } } src/margin_trading/websocket_streams/models/trade_data_stream_events_response.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(try_from = "Value")] pub enum TradeDataStreamEventsResponse { #[serde(rename = "outboundAccountPosition")] OutboundAccountPosition(Box), #[serde(rename = "balanceUpdate")] BalanceUpdate(Box), #[serde(rename = "listenKeyExpired")] ListenKeyExpired(Box), #[serde(rename = "executionReport")] ExecutionReport(Box), #[serde(rename = "listStatus")] ListStatus(Box), Other(serde_json::Value), } impl Default for TradeDataStreamEventsResponse { fn default() -> Self { Self::OutboundAccountPosition(Default::default()) } } impl TryFrom for TradeDataStreamEventsResponse { type Error = serde_json::Error; fn try_from(v: Value) -> Result { let tag = v .get("e") .and_then(Value::as_str) .ok_or_else(|| serde_json::Error::custom("missing field `e`"))?; match tag { "outboundAccountPosition" => { let payload = serde_json::from_value(v)?; Ok(TradeDataStreamEventsResponse::OutboundAccountPosition( Box::new(payload), )) } "balanceUpdate" => { let payload = serde_json::from_value(v)?; Ok(TradeDataStreamEventsResponse::BalanceUpdate(Box::new( payload, ))) } "listenKeyExpired" => { let payload = serde_json::from_value(v)?; Ok(TradeDataStreamEventsResponse::ListenKeyExpired(Box::new( payload, ))) } "executionReport" => { let payload = serde_json::from_value(v)?; Ok(TradeDataStreamEventsResponse::ExecutionReport(Box::new( payload, ))) } "listStatus" => { let payload = serde_json::from_value(v)?; Ok(TradeDataStreamEventsResponse::ListStatus(Box::new(payload))) } _ => Ok(TradeDataStreamEventsResponse::Other(v)), } } } src/margin_trading/websocket_streams/models/user_liability_change.rs /* * Binance Margin Trading WebSocket Market Streams * * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::margin_trading::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UserLiabilityChange { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, } impl UserLiabilityChange { #[must_use] pub fn new() -> UserLiabilityChange { UserLiabilityChange { e_uppercase: None, a: None, t: None, p: None, i: None, } } } src/mining/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::mining; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = mining::MiningRestApi::production(configuration); let response = client.acquiring_algorithm().await?; ``` src/mining/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::mining; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = mining::MiningRestApi::production(configuration); let response = client.acquiring_algorithm().await?; ``` src/mining/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::mining; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = mining::MiningRestApi::production(configuration); match client.acquiring_algorithm().await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/mining/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::mining; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = mining::MiningRestApi::production(configuration); let response = client.acquiring_algorithm().await?; ``` src/mining/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::mining; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = mining::MiningRestApi::production(configuration); let response = client.acquiring_algorithm().await?; ``` src/mining/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::mining; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = mining::MiningRestApi::production(configuration); let response = client.acquiring_algorithm().await?; ``` src/mining/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::mining; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = mining::MiningRestApi::production(configuration); let response = client.acquiring_algorithm().await?; ``` src/mining/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::mining; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = mining::MiningRestApi::production(configuration); let response = client.acquiring_algorithm().await?; ``` src/mining/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::mining; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = mining::MiningRestApi::production(configuration); let response = client.acquiring_algorithm().await?; ``` src/mining/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::MINING_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the Mining REST API client for interacting with the Binance Mining REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct MiningRestApi {} impl MiningRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production Mining REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("mining"); if config.base_path.is_none() { config.base_path = Some(MINING_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(MINING_REST_API_PROD_URL.to_string()); MiningRestApi::from_config(config) } } src/mining/rest_api/apis/mod.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod mining_api; pub use mining_api::*; src/mining/rest_api/models/account_list_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountListResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl AccountListResponse { #[must_use] pub fn new() -> AccountListResponse { AccountListResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/account_list_response_data_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountListResponseDataInner { #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "userName", skip_serializing_if = "Option::is_none")] pub user_name: Option, #[serde(rename = "list", skip_serializing_if = "Option::is_none")] pub list: Option>, } impl AccountListResponseDataInner { #[must_use] pub fn new() -> AccountListResponseDataInner { AccountListResponseDataInner { r#type: None, user_name: None, list: None, } } } src/mining/rest_api/models/account_list_response_data_inner_list_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountListResponseDataInnerListInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "hashrate", skip_serializing_if = "Option::is_none")] pub hashrate: Option, #[serde(rename = "reject", skip_serializing_if = "Option::is_none")] pub reject: Option, } impl AccountListResponseDataInnerListInner { #[must_use] pub fn new() -> AccountListResponseDataInnerListInner { AccountListResponseDataInnerListInner { time: None, hashrate: None, reject: None, } } } src/mining/rest_api/models/acquiring_algorithm_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcquiringAlgorithmResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl AcquiringAlgorithmResponse { #[must_use] pub fn new() -> AcquiringAlgorithmResponse { AcquiringAlgorithmResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/acquiring_algorithm_response_data_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcquiringAlgorithmResponseDataInner { #[serde(rename = "algoName", skip_serializing_if = "Option::is_none")] pub algo_name: Option, #[serde(rename = "algoId", skip_serializing_if = "Option::is_none")] pub algo_id: Option, #[serde(rename = "poolIndex", skip_serializing_if = "Option::is_none")] pub pool_index: Option, #[serde(rename = "unit", skip_serializing_if = "Option::is_none")] pub unit: Option, } impl AcquiringAlgorithmResponseDataInner { #[must_use] pub fn new() -> AcquiringAlgorithmResponseDataInner { AcquiringAlgorithmResponseDataInner { algo_name: None, algo_id: None, pool_index: None, unit: None, } } } src/mining/rest_api/models/acquiring_coinname_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcquiringCoinnameResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl AcquiringCoinnameResponse { #[must_use] pub fn new() -> AcquiringCoinnameResponse { AcquiringCoinnameResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/acquiring_coinname_response_data_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AcquiringCoinnameResponseDataInner { #[serde(rename = "coinName", skip_serializing_if = "Option::is_none")] pub coin_name: Option, #[serde(rename = "coinId", skip_serializing_if = "Option::is_none")] pub coin_id: Option, #[serde(rename = "poolIndex", skip_serializing_if = "Option::is_none")] pub pool_index: Option, #[serde(rename = "algoId", skip_serializing_if = "Option::is_none")] pub algo_id: Option, #[serde(rename = "algoName", skip_serializing_if = "Option::is_none")] pub algo_name: Option, } impl AcquiringCoinnameResponseDataInner { #[must_use] pub fn new() -> AcquiringCoinnameResponseDataInner { AcquiringCoinnameResponseDataInner { coin_name: None, coin_id: None, pool_index: None, algo_id: None, algo_name: None, } } } src/mining/rest_api/models/cancel_hashrate_resale_configuration_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelHashrateResaleConfigurationResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option, } impl CancelHashrateResaleConfigurationResponse { #[must_use] pub fn new() -> CancelHashrateResaleConfigurationResponse { CancelHashrateResaleConfigurationResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/earnings_list_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EarningsListResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl EarningsListResponse { #[must_use] pub fn new() -> EarningsListResponse { EarningsListResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/earnings_list_response_data.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EarningsListResponseData { #[serde(rename = "accountProfits", skip_serializing_if = "Option::is_none")] pub account_profits: Option>, #[serde(rename = "totalNum", skip_serializing_if = "Option::is_none")] pub total_num: Option, #[serde(rename = "pageSize", skip_serializing_if = "Option::is_none")] pub page_size: Option, } impl EarningsListResponseData { #[must_use] pub fn new() -> EarningsListResponseData { EarningsListResponseData { account_profits: None, total_num: None, page_size: None, } } } src/mining/rest_api/models/earnings_list_response_data_account_profits_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EarningsListResponseDataAccountProfitsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "hashTransfer", skip_serializing_if = "Option::is_none")] pub hash_transfer: Option, #[serde(rename = "transferAmount", skip_serializing_if = "Option::is_none")] pub transfer_amount: Option, #[serde(rename = "dayHashRate", skip_serializing_if = "Option::is_none")] pub day_hash_rate: Option, #[serde(rename = "profitAmount", skip_serializing_if = "Option::is_none")] pub profit_amount: Option, #[serde(rename = "coinName", skip_serializing_if = "Option::is_none")] pub coin_name: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl EarningsListResponseDataAccountProfitsInner { #[must_use] pub fn new() -> EarningsListResponseDataAccountProfitsInner { EarningsListResponseDataAccountProfitsInner { time: None, r#type: None, hash_transfer: None, transfer_amount: None, day_hash_rate: None, profit_amount: None, coin_name: None, status: None, } } } src/mining/rest_api/models/extra_bonus_list_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExtraBonusListResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl ExtraBonusListResponse { #[must_use] pub fn new() -> ExtraBonusListResponse { ExtraBonusListResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/extra_bonus_list_response_data.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExtraBonusListResponseData { #[serde(rename = "otherProfits", skip_serializing_if = "Option::is_none")] pub other_profits: Option>, #[serde(rename = "totalNum", skip_serializing_if = "Option::is_none")] pub total_num: Option, #[serde(rename = "pageSize", skip_serializing_if = "Option::is_none")] pub page_size: Option, } impl ExtraBonusListResponseData { #[must_use] pub fn new() -> ExtraBonusListResponseData { ExtraBonusListResponseData { other_profits: None, total_num: None, page_size: None, } } } src/mining/rest_api/models/extra_bonus_list_response_data_other_profits_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExtraBonusListResponseDataOtherProfitsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "coinName", skip_serializing_if = "Option::is_none")] pub coin_name: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "profitAmount", skip_serializing_if = "Option::is_none")] pub profit_amount: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl ExtraBonusListResponseDataOtherProfitsInner { #[must_use] pub fn new() -> ExtraBonusListResponseDataOtherProfitsInner { ExtraBonusListResponseDataOtherProfitsInner { time: None, coin_name: None, r#type: None, profit_amount: None, status: None, } } } src/mining/rest_api/models/hashrate_resale_detail_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HashrateResaleDetailResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl HashrateResaleDetailResponse { #[must_use] pub fn new() -> HashrateResaleDetailResponse { HashrateResaleDetailResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/hashrate_resale_detail_response_data.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HashrateResaleDetailResponseData { #[serde( rename = "profitTransferDetails", skip_serializing_if = "Option::is_none" )] pub profit_transfer_details: Option>, #[serde(rename = "totalNum", skip_serializing_if = "Option::is_none")] pub total_num: Option, #[serde(rename = "pageSize", skip_serializing_if = "Option::is_none")] pub page_size: Option, } impl HashrateResaleDetailResponseData { #[must_use] pub fn new() -> HashrateResaleDetailResponseData { HashrateResaleDetailResponseData { profit_transfer_details: None, total_num: None, page_size: None, } } } src/mining/rest_api/models/hashrate_resale_detail_response_data_profit_transfer_details_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HashrateResaleDetailResponseDataProfitTransferDetailsInner { #[serde(rename = "poolUsername", skip_serializing_if = "Option::is_none")] pub pool_username: Option, #[serde(rename = "toPoolUsername", skip_serializing_if = "Option::is_none")] pub to_pool_username: Option, #[serde(rename = "algoName", skip_serializing_if = "Option::is_none")] pub algo_name: Option, #[serde(rename = "hashRate", skip_serializing_if = "Option::is_none")] pub hash_rate: Option, #[serde(rename = "day", skip_serializing_if = "Option::is_none")] pub day: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "coinName", skip_serializing_if = "Option::is_none")] pub coin_name: Option, } impl HashrateResaleDetailResponseDataProfitTransferDetailsInner { #[must_use] pub fn new() -> HashrateResaleDetailResponseDataProfitTransferDetailsInner { HashrateResaleDetailResponseDataProfitTransferDetailsInner { pool_username: None, to_pool_username: None, algo_name: None, hash_rate: None, day: None, amount: None, coin_name: None, } } } src/mining/rest_api/models/hashrate_resale_list_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HashrateResaleListResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl HashrateResaleListResponse { #[must_use] pub fn new() -> HashrateResaleListResponse { HashrateResaleListResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/hashrate_resale_list_response_data.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HashrateResaleListResponseData { #[serde(rename = "configDetails", skip_serializing_if = "Option::is_none")] pub config_details: Option>, #[serde(rename = "totalNum", skip_serializing_if = "Option::is_none")] pub total_num: Option, #[serde(rename = "pageSize", skip_serializing_if = "Option::is_none")] pub page_size: Option, } impl HashrateResaleListResponseData { #[must_use] pub fn new() -> HashrateResaleListResponseData { HashrateResaleListResponseData { config_details: None, total_num: None, page_size: None, } } } src/mining/rest_api/models/hashrate_resale_list_response_data_config_details_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HashrateResaleListResponseDataConfigDetailsInner { #[serde(rename = "configId", skip_serializing_if = "Option::is_none")] pub config_id: Option, #[serde(rename = "poolUsername", skip_serializing_if = "Option::is_none")] pub pool_username: Option, #[serde(rename = "toPoolUsername", skip_serializing_if = "Option::is_none")] pub to_pool_username: Option, #[serde(rename = "algoName", skip_serializing_if = "Option::is_none")] pub algo_name: Option, #[serde(rename = "hashRate", skip_serializing_if = "Option::is_none")] pub hash_rate: Option, #[serde(rename = "startDay", skip_serializing_if = "Option::is_none")] pub start_day: Option, #[serde(rename = "endDay", skip_serializing_if = "Option::is_none")] pub end_day: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl HashrateResaleListResponseDataConfigDetailsInner { #[must_use] pub fn new() -> HashrateResaleListResponseDataConfigDetailsInner { HashrateResaleListResponseDataConfigDetailsInner { config_id: None, pool_username: None, to_pool_username: None, algo_name: None, hash_rate: None, start_day: None, end_day: None, status: None, } } } src/mining/rest_api/models/hashrate_resale_request_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HashrateResaleRequestResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option, } impl HashrateResaleRequestResponse { #[must_use] pub fn new() -> HashrateResaleRequestResponse { HashrateResaleRequestResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/mining_account_earning_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MiningAccountEarningResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl MiningAccountEarningResponse { #[must_use] pub fn new() -> MiningAccountEarningResponse { MiningAccountEarningResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/mining_account_earning_response_data.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MiningAccountEarningResponseData { #[serde(rename = "accountProfits", skip_serializing_if = "Option::is_none")] pub account_profits: Option>, #[serde(rename = "totalNum", skip_serializing_if = "Option::is_none")] pub total_num: Option, #[serde(rename = "pageSize", skip_serializing_if = "Option::is_none")] pub page_size: Option, } impl MiningAccountEarningResponseData { #[must_use] pub fn new() -> MiningAccountEarningResponseData { MiningAccountEarningResponseData { account_profits: None, total_num: None, page_size: None, } } } src/mining/rest_api/models/mining_account_earning_response_data_account_profits_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MiningAccountEarningResponseDataAccountProfitsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "coinName", skip_serializing_if = "Option::is_none")] pub coin_name: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "puid", skip_serializing_if = "Option::is_none")] pub puid: Option, #[serde(rename = "subName", skip_serializing_if = "Option::is_none")] pub sub_name: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, } impl MiningAccountEarningResponseDataAccountProfitsInner { #[must_use] pub fn new() -> MiningAccountEarningResponseDataAccountProfitsInner { MiningAccountEarningResponseDataAccountProfitsInner { time: None, coin_name: None, r#type: None, puid: None, sub_name: None, amount: None, } } } src/mining/rest_api/models/request_for_detail_miner_list_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RequestForDetailMinerListResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl RequestForDetailMinerListResponse { #[must_use] pub fn new() -> RequestForDetailMinerListResponse { RequestForDetailMinerListResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/request_for_detail_miner_list_response_data_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RequestForDetailMinerListResponseDataInner { #[serde(rename = "workerName", skip_serializing_if = "Option::is_none")] pub worker_name: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "hashrateDatas", skip_serializing_if = "Option::is_none")] pub hashrate_datas: Option>, } impl RequestForDetailMinerListResponseDataInner { #[must_use] pub fn new() -> RequestForDetailMinerListResponseDataInner { RequestForDetailMinerListResponseDataInner { worker_name: None, r#type: None, hashrate_datas: None, } } } src/mining/rest_api/models/request_for_detail_miner_list_response_data_inner_hashrate_datas_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RequestForDetailMinerListResponseDataInnerHashrateDatasInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "hashrate", skip_serializing_if = "Option::is_none")] pub hashrate: Option, #[serde(rename = "reject", skip_serializing_if = "Option::is_none")] pub reject: Option, } impl RequestForDetailMinerListResponseDataInnerHashrateDatasInner { #[must_use] pub fn new() -> RequestForDetailMinerListResponseDataInnerHashrateDatasInner { RequestForDetailMinerListResponseDataInnerHashrateDatasInner { time: None, hashrate: None, reject: None, } } } src/mining/rest_api/models/request_for_miner_list_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RequestForMinerListResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl RequestForMinerListResponse { #[must_use] pub fn new() -> RequestForMinerListResponse { RequestForMinerListResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/request_for_miner_list_response_data.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RequestForMinerListResponseData { #[serde(rename = "workerDatas", skip_serializing_if = "Option::is_none")] pub worker_datas: Option>, #[serde(rename = "totalNum", skip_serializing_if = "Option::is_none")] pub total_num: Option, #[serde(rename = "pageSize", skip_serializing_if = "Option::is_none")] pub page_size: Option, } impl RequestForMinerListResponseData { #[must_use] pub fn new() -> RequestForMinerListResponseData { RequestForMinerListResponseData { worker_datas: None, total_num: None, page_size: None, } } } src/mining/rest_api/models/request_for_miner_list_response_data_worker_datas_inner.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RequestForMinerListResponseDataWorkerDatasInner { #[serde(rename = "workerId", skip_serializing_if = "Option::is_none")] pub worker_id: Option, #[serde(rename = "workerName", skip_serializing_if = "Option::is_none")] pub worker_name: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "hashRate", skip_serializing_if = "Option::is_none")] pub hash_rate: Option, #[serde(rename = "dayHashRate", skip_serializing_if = "Option::is_none")] pub day_hash_rate: Option, #[serde(rename = "rejectRate", skip_serializing_if = "Option::is_none")] pub reject_rate: Option, #[serde(rename = "lastShareTime", skip_serializing_if = "Option::is_none")] pub last_share_time: Option, } impl RequestForMinerListResponseDataWorkerDatasInner { #[must_use] pub fn new() -> RequestForMinerListResponseDataWorkerDatasInner { RequestForMinerListResponseDataWorkerDatasInner { worker_id: None, worker_name: None, status: None, hash_rate: None, day_hash_rate: None, reject_rate: None, last_share_time: None, } } } src/mining/rest_api/models/statistic_list_response.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StatisticListResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl StatisticListResponse { #[must_use] pub fn new() -> StatisticListResponse { StatisticListResponse { code: None, msg: None, data: None, } } } src/mining/rest_api/models/statistic_list_response_data.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StatisticListResponseData { #[serde(rename = "fifteenMinHashRate", skip_serializing_if = "Option::is_none")] pub fifteen_min_hash_rate: Option, #[serde(rename = "dayHashRate", skip_serializing_if = "Option::is_none")] pub day_hash_rate: Option, #[serde(rename = "validNum", skip_serializing_if = "Option::is_none")] pub valid_num: Option, #[serde(rename = "invalidNum", skip_serializing_if = "Option::is_none")] pub invalid_num: Option, #[serde(rename = "profitToday", skip_serializing_if = "Option::is_none")] pub profit_today: Option>, #[serde(rename = "profitYesterday", skip_serializing_if = "Option::is_none")] pub profit_yesterday: Option>, #[serde(rename = "userName", skip_serializing_if = "Option::is_none")] pub user_name: Option, #[serde(rename = "unit", skip_serializing_if = "Option::is_none")] pub unit: Option, #[serde(rename = "algo", skip_serializing_if = "Option::is_none")] pub algo: Option, } impl StatisticListResponseData { #[must_use] pub fn new() -> StatisticListResponseData { StatisticListResponseData { fifteen_min_hash_rate: None, day_hash_rate: None, valid_num: None, invalid_num: None, profit_today: None, profit_yesterday: None, user_name: None, unit: None, algo: None, } } } src/mining/rest_api/models/statistic_list_response_data_profit_today.rs /* * Binance Mining REST API * * OpenAPI Specification for the Binance Mining REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::mining::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StatisticListResponseDataProfitToday { #[serde(rename = "BTC", skip_serializing_if = "Option::is_none")] pub btc: Option, #[serde(rename = "BSV", skip_serializing_if = "Option::is_none")] pub bsv: Option, #[serde(rename = "BCH", skip_serializing_if = "Option::is_none")] pub bch: Option, } impl StatisticListResponseDataProfitToday { #[must_use] pub fn new() -> StatisticListResponseDataProfitToday { StatisticListResponseDataProfitToday { btc: None, bsv: None, bch: None, } } } src/nft/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::nft; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = nft::NFTRestApi::production(configuration); let params = nft::rest_api::GetNftAssetParams::default(); let response = client.get_nft_asset(params).await?; ``` src/nft/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::nft; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = nft::NFTRestApi::production(configuration); let params = nft::rest_api::GetNftAssetParams::default(); let response = client.get_nft_asset(params).await?; ``` src/nft/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::nft; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = nft::NFTRestApi::production(configuration); let params = nft::rest_api::GetNftAssetParams::default(); match client.get_nft_asset(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/nft/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::nft; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = nft::NFTRestApi::production(configuration); let params = nft::rest_api::GetNftAssetParams::default(); let response = client.get_nft_asset(params).await?; ``` src/nft/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::nft; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = nft::NFTRestApi::production(configuration); let params = nft::rest_api::GetNftAssetParams::default(); let response = client.get_nft_asset(params).await?; ``` src/nft/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::nft; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = nft::NFTRestApi::production(configuration); let params = nft::rest_api::GetNftAssetParams::default(); let response = client.get_nft_asset(params).await?; ``` src/nft/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::nft; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = nft::NFTRestApi::production(configuration); let params = nft::rest_api::GetNftAssetParams::default(); let response = client.get_nft_asset(params).await?; ``` src/nft/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::nft; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = nft::NFTRestApi::production(configuration); let params = nft::rest_api::GetNftAssetParams::default(); let response = client.get_nft_asset(params).await?; ``` src/nft/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::nft; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = nft::NFTRestApi::production(configuration); let params = nft::rest_api::GetNftAssetParams::default(); let response = client.get_nft_asset(params).await?; ``` src/nft/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::NFT_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the NFT REST API client for interacting with the Binance NFT REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct NFTRestApi {} impl NFTRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production NFT REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("nft"); if config.base_path.is_none() { config.base_path = Some(NFT_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(NFT_REST_API_PROD_URL.to_string()); NFTRestApi::from_config(config) } } src/nft/rest_api/apis/mod.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod nft_api; pub use nft_api::*; src/nft/rest_api/models/get_nft_asset_response.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::nft::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNftAssetResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "list", skip_serializing_if = "Option::is_none")] pub list: Option>, } impl GetNftAssetResponse { #[must_use] pub fn new() -> GetNftAssetResponse { GetNftAssetResponse { total: None, list: None, } } } src/nft/rest_api/models/get_nft_asset_response_list_inner.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::nft::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNftAssetResponseListInner { #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "contractAddress", skip_serializing_if = "Option::is_none")] pub contract_address: Option, #[serde(rename = "tokenId", skip_serializing_if = "Option::is_none")] pub token_id: Option, } impl GetNftAssetResponseListInner { #[must_use] pub fn new() -> GetNftAssetResponseListInner { GetNftAssetResponseListInner { network: None, contract_address: None, token_id: None, } } } src/nft/rest_api/models/get_nft_deposit_history_response.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::nft::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNftDepositHistoryResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "list", skip_serializing_if = "Option::is_none")] pub list: Option>, } impl GetNftDepositHistoryResponse { #[must_use] pub fn new() -> GetNftDepositHistoryResponse { GetNftDepositHistoryResponse { total: None, list: None, } } } src/nft/rest_api/models/get_nft_deposit_history_response_list_inner.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::nft::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNftDepositHistoryResponseListInner { #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "txID", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde(rename = "contractAdrress", skip_serializing_if = "Option::is_none")] pub contract_adrress: Option, #[serde(rename = "tokenId", skip_serializing_if = "Option::is_none")] pub token_id: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl GetNftDepositHistoryResponseListInner { #[must_use] pub fn new() -> GetNftDepositHistoryResponseListInner { GetNftDepositHistoryResponseListInner { network: None, tx_id: None, contract_adrress: None, token_id: None, timestamp: None, } } } src/nft/rest_api/models/get_nft_transaction_history_response.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::nft::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNftTransactionHistoryResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "list", skip_serializing_if = "Option::is_none")] pub list: Option>, } impl GetNftTransactionHistoryResponse { #[must_use] pub fn new() -> GetNftTransactionHistoryResponse { GetNftTransactionHistoryResponse { total: None, list: None, } } } src/nft/rest_api/models/get_nft_transaction_history_response_list_inner.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::nft::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNftTransactionHistoryResponseListInner { #[serde(rename = "orderNo", skip_serializing_if = "Option::is_none")] pub order_no: Option, #[serde(rename = "tokens", skip_serializing_if = "Option::is_none")] pub tokens: Option>, #[serde(rename = "tradeTime", skip_serializing_if = "Option::is_none")] pub trade_time: Option, #[serde(rename = "tradeAmount", skip_serializing_if = "Option::is_none")] pub trade_amount: Option, #[serde(rename = "tradeCurrency", skip_serializing_if = "Option::is_none")] pub trade_currency: Option, } impl GetNftTransactionHistoryResponseListInner { #[must_use] pub fn new() -> GetNftTransactionHistoryResponseListInner { GetNftTransactionHistoryResponseListInner { order_no: None, tokens: None, trade_time: None, trade_amount: None, trade_currency: None, } } } src/nft/rest_api/models/get_nft_transaction_history_response_list_inner_tokens_inner.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::nft::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNftTransactionHistoryResponseListInnerTokensInner { #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "tokenId", skip_serializing_if = "Option::is_none")] pub token_id: Option, #[serde(rename = "contractAddress", skip_serializing_if = "Option::is_none")] pub contract_address: Option, } impl GetNftTransactionHistoryResponseListInnerTokensInner { #[must_use] pub fn new() -> GetNftTransactionHistoryResponseListInnerTokensInner { GetNftTransactionHistoryResponseListInnerTokensInner { network: None, token_id: None, contract_address: None, } } } src/nft/rest_api/models/get_nft_withdraw_history_response.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::nft::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNftWithdrawHistoryResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "list", skip_serializing_if = "Option::is_none")] pub list: Option>, } impl GetNftWithdrawHistoryResponse { #[must_use] pub fn new() -> GetNftWithdrawHistoryResponse { GetNftWithdrawHistoryResponse { total: None, list: None, } } } src/nft/rest_api/models/get_nft_withdraw_history_response_list_inner.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::nft::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNftWithdrawHistoryResponseListInner { #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "txID", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde(rename = "contractAdrress", skip_serializing_if = "Option::is_none")] pub contract_adrress: Option, #[serde(rename = "tokenId", skip_serializing_if = "Option::is_none")] pub token_id: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "feeAsset", skip_serializing_if = "Option::is_none")] pub fee_asset: Option, } impl GetNftWithdrawHistoryResponseListInner { #[must_use] pub fn new() -> GetNftWithdrawHistoryResponseListInner { GetNftWithdrawHistoryResponseListInner { network: None, tx_id: None, contract_adrress: None, token_id: None, timestamp: None, fee: None, fee_asset: None, } } } src/nft/rest_api/models/mod.rs /* * Binance NFT REST API * * OpenAPI Specification for the Binance NFT REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod get_nft_asset_response; pub use self::get_nft_asset_response::GetNftAssetResponse; pub mod get_nft_asset_response_list_inner; pub use self::get_nft_asset_response_list_inner::GetNftAssetResponseListInner; pub mod get_nft_deposit_history_response; pub use self::get_nft_deposit_history_response::GetNftDepositHistoryResponse; pub mod get_nft_deposit_history_response_list_inner; pub use self::get_nft_deposit_history_response_list_inner::GetNftDepositHistoryResponseListInner; pub mod get_nft_transaction_history_response; pub use self::get_nft_transaction_history_response::GetNftTransactionHistoryResponse; pub mod get_nft_transaction_history_response_list_inner; pub use self::get_nft_transaction_history_response_list_inner::GetNftTransactionHistoryResponseListInner; pub mod get_nft_transaction_history_response_list_inner_tokens_inner; pub use self::get_nft_transaction_history_response_list_inner_tokens_inner::GetNftTransactionHistoryResponseListInnerTokensInner; pub mod get_nft_withdraw_history_response; pub use self::get_nft_withdraw_history_response::GetNftWithdrawHistoryResponse; pub mod get_nft_withdraw_history_response_list_inner; pub use self::get_nft_withdraw_history_response_list_inner::GetNftWithdrawHistoryResponseListInner; src/pay/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::pay; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = pay::PayRestApi::production(configuration); let params = pay::rest_api::GetPayTradeHistoryParams::default(); let response = client.get_pay_trade_history(params).await?; ``` src/pay/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::pay; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = pay::PayRestApi::production(configuration); let params = pay::rest_api::GetPayTradeHistoryParams::default(); let response = client.get_pay_trade_history(params).await?; ``` src/pay/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::pay; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = pay::PayRestApi::production(configuration); let params = pay::rest_api::GetPayTradeHistoryParams::default(); match client.get_pay_trade_history(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/pay/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::pay; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = pay::PayRestApi::production(configuration); let params = pay::rest_api::GetPayTradeHistoryParams::default(); let response = client.get_pay_trade_history(params).await?; ``` src/pay/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::pay; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = pay::PayRestApi::production(configuration); let params = pay::rest_api::GetPayTradeHistoryParams::default(); let response = client.get_pay_trade_history(params).await?; ``` src/pay/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::pay; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = pay::PayRestApi::production(configuration); let params = pay::rest_api::GetPayTradeHistoryParams::default(); let response = client.get_pay_trade_history(params).await?; ``` src/pay/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::pay; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = pay::PayRestApi::production(configuration); let params = pay::rest_api::GetPayTradeHistoryParams::default(); let response = client.get_pay_trade_history(params).await?; ``` src/pay/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::pay; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = pay::PayRestApi::production(configuration); let params = pay::rest_api::GetPayTradeHistoryParams::default(); let response = client.get_pay_trade_history(params).await?; ``` src/pay/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::pay; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = pay::PayRestApi::production(configuration); let params = pay::rest_api::GetPayTradeHistoryParams::default(); let response = client.get_pay_trade_history(params).await?; ``` src/pay/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::PAY_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the Pay REST API client for interacting with the Binance Pay REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct PayRestApi {} impl PayRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production Pay REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("pay"); if config.base_path.is_none() { config.base_path = Some(PAY_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(PAY_REST_API_PROD_URL.to_string()); PayRestApi::from_config(config) } } src/pay/rest_api/apis/mod.rs /* * Binance Pay REST API * * OpenAPI Specification for the Binance Pay REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod pay_api; pub use pay_api::*; src/pay/rest_api/models/get_pay_trade_history_response.rs /* * Binance Pay REST API * * OpenAPI Specification for the Binance Pay REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::pay::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPayTradeHistoryResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl GetPayTradeHistoryResponse { #[must_use] pub fn new() -> GetPayTradeHistoryResponse { GetPayTradeHistoryResponse { code: None, message: None, data: None, success: None, } } } src/pay/rest_api/models/get_pay_trade_history_response_data_inner.rs /* * Binance Pay REST API * * OpenAPI Specification for the Binance Pay REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::pay::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPayTradeHistoryResponseDataInner { #[serde(rename = "orderType", skip_serializing_if = "Option::is_none")] pub order_type: Option, #[serde(rename = "transactionId", skip_serializing_if = "Option::is_none")] pub transaction_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "currency", skip_serializing_if = "Option::is_none")] pub currency: Option, #[serde(rename = "walletType", skip_serializing_if = "Option::is_none")] pub wallet_type: Option, #[serde(rename = "walletTypes", skip_serializing_if = "Option::is_none")] pub wallet_types: Option>, #[serde(rename = "fundsDetail", skip_serializing_if = "Option::is_none")] pub funds_detail: Option>, #[serde(rename = "payerInfo", skip_serializing_if = "Option::is_none")] pub payer_info: Option>, #[serde(rename = "receiverInfo", skip_serializing_if = "Option::is_none")] pub receiver_info: Option>, } impl GetPayTradeHistoryResponseDataInner { #[must_use] pub fn new() -> GetPayTradeHistoryResponseDataInner { GetPayTradeHistoryResponseDataInner { order_type: None, transaction_id: None, transaction_time: None, amount: None, currency: None, wallet_type: None, wallet_types: None, funds_detail: None, payer_info: None, receiver_info: None, } } } src/pay/rest_api/models/get_pay_trade_history_response_data_inner_funds_detail_inner.rs /* * Binance Pay REST API * * OpenAPI Specification for the Binance Pay REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::pay::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPayTradeHistoryResponseDataInnerFundsDetailInner { #[serde(rename = "currency", skip_serializing_if = "Option::is_none")] pub currency: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "walletAssetCost", skip_serializing_if = "Option::is_none")] pub wallet_asset_cost: Option< Vec, >, } impl GetPayTradeHistoryResponseDataInnerFundsDetailInner { #[must_use] pub fn new() -> GetPayTradeHistoryResponseDataInnerFundsDetailInner { GetPayTradeHistoryResponseDataInnerFundsDetailInner { currency: None, amount: None, wallet_asset_cost: None, } } } src/pay/rest_api/models/get_pay_trade_history_response_data_inner_funds_detail_inner_wallet_asset_cost_inner.rs /* * Binance Pay REST API * * OpenAPI Specification for the Binance Pay REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::pay::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner { #[serde(rename = "1", skip_serializing_if = "Option::is_none")] pub param_1: Option, #[serde(rename = "2", skip_serializing_if = "Option::is_none")] pub param_2: Option, } impl GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner { #[must_use] pub fn new() -> GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner { GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner { param_1: None, param_2: None, } } } src/pay/rest_api/models/get_pay_trade_history_response_data_inner_payer_info.rs /* * Binance Pay REST API * * OpenAPI Specification for the Binance Pay REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::pay::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPayTradeHistoryResponseDataInnerPayerInfo { #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "binanceId", skip_serializing_if = "Option::is_none")] pub binance_id: Option, } impl GetPayTradeHistoryResponseDataInnerPayerInfo { #[must_use] pub fn new() -> GetPayTradeHistoryResponseDataInnerPayerInfo { GetPayTradeHistoryResponseDataInnerPayerInfo { name: None, r#type: None, binance_id: None, } } } src/pay/rest_api/models/get_pay_trade_history_response_data_inner_receiver_info.rs /* * Binance Pay REST API * * OpenAPI Specification for the Binance Pay REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::pay::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPayTradeHistoryResponseDataInnerReceiverInfo { #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "binanceId", skip_serializing_if = "Option::is_none")] pub binance_id: Option, #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")] pub account_id: Option, #[serde(rename = "countryCode", skip_serializing_if = "Option::is_none")] pub country_code: Option, #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")] pub phone_number: Option, #[serde(rename = "mobileCode", skip_serializing_if = "Option::is_none")] pub mobile_code: Option, #[serde(rename = "extend", skip_serializing_if = "Option::is_none")] pub extend: Option>, } impl GetPayTradeHistoryResponseDataInnerReceiverInfo { #[must_use] pub fn new() -> GetPayTradeHistoryResponseDataInnerReceiverInfo { GetPayTradeHistoryResponseDataInnerReceiverInfo { name: None, r#type: None, email: None, binance_id: None, account_id: None, country_code: None, phone_number: None, mobile_code: None, extend: None, } } } src/pay/rest_api/models/get_pay_trade_history_response_data_inner_receiver_info_extend.rs /* * Binance Pay REST API * * OpenAPI Specification for the Binance Pay REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::pay::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetPayTradeHistoryResponseDataInnerReceiverInfoExtend { #[serde(rename = "institutionName", skip_serializing_if = "Option::is_none")] pub institution_name: Option, #[serde(rename = "cardNumber", skip_serializing_if = "Option::is_none")] pub card_number: Option, #[serde(rename = "digitalWalletId", skip_serializing_if = "Option::is_none")] pub digital_wallet_id: Option, } impl GetPayTradeHistoryResponseDataInnerReceiverInfoExtend { #[must_use] pub fn new() -> GetPayTradeHistoryResponseDataInnerReceiverInfoExtend { GetPayTradeHistoryResponseDataInnerReceiverInfoExtend { institution_name: None, card_number: None, digital_wallet_id: None, } } } src/pay/rest_api/models/mod.rs /* * Binance Pay REST API * * OpenAPI Specification for the Binance Pay REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod get_pay_trade_history_response; pub use self::get_pay_trade_history_response::GetPayTradeHistoryResponse; pub mod get_pay_trade_history_response_data_inner; pub use self::get_pay_trade_history_response_data_inner::GetPayTradeHistoryResponseDataInner; pub mod get_pay_trade_history_response_data_inner_funds_detail_inner; pub use self::get_pay_trade_history_response_data_inner_funds_detail_inner::GetPayTradeHistoryResponseDataInnerFundsDetailInner; pub mod get_pay_trade_history_response_data_inner_funds_detail_inner_wallet_asset_cost_inner; pub use self::get_pay_trade_history_response_data_inner_funds_detail_inner_wallet_asset_cost_inner::GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner; pub mod get_pay_trade_history_response_data_inner_payer_info; pub use self::get_pay_trade_history_response_data_inner_payer_info::GetPayTradeHistoryResponseDataInnerPayerInfo; pub mod get_pay_trade_history_response_data_inner_receiver_info; pub use self::get_pay_trade_history_response_data_inner_receiver_info::GetPayTradeHistoryResponseDataInnerReceiverInfo; pub mod get_pay_trade_history_response_data_inner_receiver_info_extend; pub use self::get_pay_trade_history_response_data_inner_receiver_info_extend::GetPayTradeHistoryResponseDataInnerReceiverInfoExtend; src/rebate/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::rebate; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = rebate::RebateRestApi::production(configuration); let params = rebate::rest_api::GetSpotRebateHistoryRecordsParams::default(); let response = client.get_spot_rebate_history_records(params).await?; ``` src/rebate/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::rebate; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = rebate::RebateRestApi::production(configuration); let params = rebate::rest_api::GetSpotRebateHistoryRecordsParams::default(); let response = client.get_spot_rebate_history_records(params).await?; ``` src/rebate/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::rebate; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = rebate::RebateRestApi::production(configuration); let params = rebate::rest_api::GetSpotRebateHistoryRecordsParams::default(); match client.get_spot_rebate_history_records(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/rebate/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::rebate; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = rebate::RebateRestApi::production(configuration); let params = rebate::rest_api::GetSpotRebateHistoryRecordsParams::default(); let response = client.get_spot_rebate_history_records(params).await?; ``` src/rebate/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::rebate; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = rebate::RebateRestApi::production(configuration); let params = rebate::rest_api::GetSpotRebateHistoryRecordsParams::default(); let response = client.get_spot_rebate_history_records(params).await?; ``` src/rebate/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::rebate; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = rebate::RebateRestApi::production(configuration); let params = rebate::rest_api::GetSpotRebateHistoryRecordsParams::default(); let response = client.get_spot_rebate_history_records(params).await?; ``` src/rebate/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::rebate; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = rebate::RebateRestApi::production(configuration); let params = rebate::rest_api::GetSpotRebateHistoryRecordsParams::default(); let response = client.get_spot_rebate_history_records(params).await?; ``` src/rebate/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::rebate; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = rebate::RebateRestApi::production(configuration); let params = rebate::rest_api::GetSpotRebateHistoryRecordsParams::default(); let response = client.get_spot_rebate_history_records(params).await?; ``` src/rebate/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::rebate; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = rebate::RebateRestApi::production(configuration); let params = rebate::rest_api::GetSpotRebateHistoryRecordsParams::default(); let response = client.get_spot_rebate_history_records(params).await?; ``` src/rebate/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::REBATE_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the Rebate REST API client for interacting with the Binance Rebate REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct RebateRestApi {} impl RebateRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production Rebate REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("rebate"); if config.base_path.is_none() { config.base_path = Some(REBATE_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(REBATE_REST_API_PROD_URL.to_string()); RebateRestApi::from_config(config) } } src/rebate/rest_api/apis/mod.rs /* * Binance Rebate REST API * * OpenAPI Specification for the Binance Rebate REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod rebate_api; pub use rebate_api::*; src/rebate/rest_api/models/get_spot_rebate_history_records_response.rs /* * Binance Rebate REST API * * OpenAPI Specification for the Binance Rebate REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::rebate::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSpotRebateHistoryRecordsResponse { #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl GetSpotRebateHistoryRecordsResponse { #[must_use] pub fn new() -> GetSpotRebateHistoryRecordsResponse { GetSpotRebateHistoryRecordsResponse { status: None, r#type: None, code: None, data: None, } } } src/rebate/rest_api/models/get_spot_rebate_history_records_response_data.rs /* * Binance Rebate REST API * * OpenAPI Specification for the Binance Rebate REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::rebate::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSpotRebateHistoryRecordsResponseData { #[serde(rename = "page", skip_serializing_if = "Option::is_none")] pub page: Option, #[serde(rename = "totalRecords", skip_serializing_if = "Option::is_none")] pub total_records: Option, #[serde(rename = "totalPageNum", skip_serializing_if = "Option::is_none")] pub total_page_num: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl GetSpotRebateHistoryRecordsResponseData { #[must_use] pub fn new() -> GetSpotRebateHistoryRecordsResponseData { GetSpotRebateHistoryRecordsResponseData { page: None, total_records: None, total_page_num: None, data: None, } } } src/rebate/rest_api/models/get_spot_rebate_history_records_response_data_data_inner.rs /* * Binance Rebate REST API * * OpenAPI Specification for the Binance Rebate REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::rebate::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSpotRebateHistoryRecordsResponseDataDataInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl GetSpotRebateHistoryRecordsResponseDataDataInner { #[must_use] pub fn new() -> GetSpotRebateHistoryRecordsResponseDataDataInner { GetSpotRebateHistoryRecordsResponseDataDataInner { asset: None, r#type: None, amount: None, update_time: None, } } } src/rebate/rest_api/models/mod.rs /* * Binance Rebate REST API * * OpenAPI Specification for the Binance Rebate REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod get_spot_rebate_history_records_response; pub use self::get_spot_rebate_history_records_response::GetSpotRebateHistoryRecordsResponse; pub mod get_spot_rebate_history_records_response_data; pub use self::get_spot_rebate_history_records_response_data::GetSpotRebateHistoryRecordsResponseData; pub mod get_spot_rebate_history_records_response_data_data_inner; pub use self::get_spot_rebate_history_records_response_data_data_inner::GetSpotRebateHistoryRecordsResponseDataDataInner; src/simple_earn/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::simple_earn; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = simple_earn::SimpleEarnRestApi::production(configuration); let params = simple_earn::rest_api::GetSimpleEarnFlexibleProductListParams::default(); let response = client.get_simple_earn_flexible_product_list(params).await?; ``` src/simple_earn/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::simple_earn; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = simple_earn::SimpleEarnRestApi::production(configuration); let params = simple_earn::rest_api::GetSimpleEarnFlexibleProductListParams::default(); let response = client.get_simple_earn_flexible_product_list(params).await?; ``` src/simple_earn/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::simple_earn; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = simple_earn::SimpleEarnRestApi::production(configuration); let params = simple_earn::rest_api::GetSimpleEarnFlexibleProductListParams::default(); match client.get_simple_earn_flexible_product_list(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/simple_earn/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::simple_earn; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = simple_earn::SimpleEarnRestApi::production(configuration); let params = simple_earn::rest_api::GetSimpleEarnFlexibleProductListParams::default(); let response = client.get_simple_earn_flexible_product_list(params).await?; ``` src/simple_earn/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::simple_earn; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = simple_earn::SimpleEarnRestApi::production(configuration); let params = simple_earn::rest_api::GetSimpleEarnFlexibleProductListParams::default(); let response = client.get_simple_earn_flexible_product_list(params).await?; ``` src/simple_earn/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::simple_earn; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = simple_earn::SimpleEarnRestApi::production(configuration); let params = simple_earn::rest_api::GetSimpleEarnFlexibleProductListParams::default(); let response = client.get_simple_earn_flexible_product_list(params).await?; ``` src/simple_earn/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::simple_earn; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = simple_earn::SimpleEarnRestApi::production(configuration); let params = simple_earn::rest_api::GetSimpleEarnFlexibleProductListParams::default(); let response = client.get_simple_earn_flexible_product_list(params).await?; ``` src/simple_earn/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::simple_earn; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = simple_earn::SimpleEarnRestApi::production(configuration); let params = simple_earn::rest_api::GetSimpleEarnFlexibleProductListParams::default(); let response = client.get_simple_earn_flexible_product_list(params).await?; ``` src/simple_earn/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::simple_earn; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = simple_earn::SimpleEarnRestApi::production(configuration); let params = simple_earn::rest_api::GetSimpleEarnFlexibleProductListParams::default(); let response = client.get_simple_earn_flexible_product_list(params).await?; ``` src/simple_earn/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::SIMPLE_EARN_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the `SimpleEarn` REST API client for interacting with the Binance `SimpleEarn` REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct SimpleEarnRestApi {} impl SimpleEarnRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production `SimpleEarn` REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("simple-earn"); if config.base_path.is_none() { config.base_path = Some(SIMPLE_EARN_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(SIMPLE_EARN_REST_API_PROD_URL.to_string()); SimpleEarnRestApi::from_config(config) } } src/simple_earn/rest_api/apis/mod.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod bfusd_api; pub use bfusd_api::*; pub mod flexible_locked_api; pub use flexible_locked_api::*; pub mod rwusd_api; pub use rwusd_api::*; src/simple_earn/rest_api/models/get_bfusd_account_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdAccountResponse { #[serde(rename = "bfusdAmount", skip_serializing_if = "Option::is_none")] pub bfusd_amount: Option, #[serde(rename = "totalProfit", skip_serializing_if = "Option::is_none")] pub total_profit: Option, } impl GetBfusdAccountResponse { #[must_use] pub fn new() -> GetBfusdAccountResponse { GetBfusdAccountResponse { bfusd_amount: None, total_profit: None, } } } src/simple_earn/rest_api/models/get_bfusd_quota_details_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdQuotaDetailsResponse { #[serde( rename = "fastRedemptionQuota", skip_serializing_if = "Option::is_none" )] pub fast_redemption_quota: Option>, #[serde( rename = "standardRedemptionQuota", skip_serializing_if = "Option::is_none" )] pub standard_redemption_quota: Option>, #[serde(rename = "subscribeEnable", skip_serializing_if = "Option::is_none")] pub subscribe_enable: Option, #[serde(rename = "redeemEnable", skip_serializing_if = "Option::is_none")] pub redeem_enable: Option, } impl GetBfusdQuotaDetailsResponse { #[must_use] pub fn new() -> GetBfusdQuotaDetailsResponse { GetBfusdQuotaDetailsResponse { fast_redemption_quota: None, standard_redemption_quota: None, subscribe_enable: None, redeem_enable: None, } } } src/simple_earn/rest_api/models/get_bfusd_quota_details_response_fast_redemption_quota.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdQuotaDetailsResponseFastRedemptionQuota { #[serde(rename = "leftQuota", skip_serializing_if = "Option::is_none")] pub left_quota: Option, #[serde(rename = "minimum", skip_serializing_if = "Option::is_none")] pub minimum: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "freeQuota", skip_serializing_if = "Option::is_none")] pub free_quota: Option, } impl GetBfusdQuotaDetailsResponseFastRedemptionQuota { #[must_use] pub fn new() -> GetBfusdQuotaDetailsResponseFastRedemptionQuota { GetBfusdQuotaDetailsResponseFastRedemptionQuota { left_quota: None, minimum: None, fee: None, free_quota: None, } } } src/simple_earn/rest_api/models/get_bfusd_quota_details_response_standard_redemption_quota.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdQuotaDetailsResponseStandardRedemptionQuota { #[serde(rename = "leftQuota", skip_serializing_if = "Option::is_none")] pub left_quota: Option, #[serde(rename = "minimum", skip_serializing_if = "Option::is_none")] pub minimum: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "redeemPeriod", skip_serializing_if = "Option::is_none")] pub redeem_period: Option, } impl GetBfusdQuotaDetailsResponseStandardRedemptionQuota { #[must_use] pub fn new() -> GetBfusdQuotaDetailsResponseStandardRedemptionQuota { GetBfusdQuotaDetailsResponseStandardRedemptionQuota { left_quota: None, minimum: None, fee: None, redeem_period: None, } } } src/simple_earn/rest_api/models/get_bfusd_rate_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdRateHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetBfusdRateHistoryResponse { #[must_use] pub fn new() -> GetBfusdRateHistoryResponse { GetBfusdRateHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_bfusd_rate_history_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdRateHistoryResponseRowsInner { #[serde( rename = "annualPercentageRate", skip_serializing_if = "Option::is_none" )] pub annual_percentage_rate: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl GetBfusdRateHistoryResponseRowsInner { #[must_use] pub fn new() -> GetBfusdRateHistoryResponseRowsInner { GetBfusdRateHistoryResponseRowsInner { annual_percentage_rate: None, time: None, } } } src/simple_earn/rest_api/models/get_bfusd_redemption_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdRedemptionHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetBfusdRedemptionHistoryResponse { #[must_use] pub fn new() -> GetBfusdRedemptionHistoryResponse { GetBfusdRedemptionHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_bfusd_redemption_history_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdRedemptionHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "receiveAsset", skip_serializing_if = "Option::is_none")] pub receive_asset: Option, #[serde(rename = "receiveAmount", skip_serializing_if = "Option::is_none")] pub receive_amount: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "arrivalTime", skip_serializing_if = "Option::is_none")] pub arrival_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetBfusdRedemptionHistoryResponseRowsInner { #[must_use] pub fn new() -> GetBfusdRedemptionHistoryResponseRowsInner { GetBfusdRedemptionHistoryResponseRowsInner { time: None, asset: None, amount: None, receive_asset: None, receive_amount: None, fee: None, arrival_time: None, status: None, } } } src/simple_earn/rest_api/models/get_bfusd_rewards_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdRewardsHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetBfusdRewardsHistoryResponse { #[must_use] pub fn new() -> GetBfusdRewardsHistoryResponse { GetBfusdRewardsHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_bfusd_rewards_history_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdRewardsHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "rewardsAmount", skip_serializing_if = "Option::is_none")] pub rewards_amount: Option, #[serde(rename = "BFUSDPosition", skip_serializing_if = "Option::is_none")] pub bfusd_position: Option, #[serde( rename = "annualPercentageRate", skip_serializing_if = "Option::is_none" )] pub annual_percentage_rate: Option, } impl GetBfusdRewardsHistoryResponseRowsInner { #[must_use] pub fn new() -> GetBfusdRewardsHistoryResponseRowsInner { GetBfusdRewardsHistoryResponseRowsInner { time: None, rewards_amount: None, bfusd_position: None, annual_percentage_rate: None, } } } src/simple_earn/rest_api/models/get_bfusd_subscription_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdSubscriptionHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetBfusdSubscriptionHistoryResponse { #[must_use] pub fn new() -> GetBfusdSubscriptionHistoryResponse { GetBfusdSubscriptionHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_bfusd_subscription_history_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBfusdSubscriptionHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "receiveAsset", skip_serializing_if = "Option::is_none")] pub receive_asset: Option, #[serde(rename = "receiveAmount", skip_serializing_if = "Option::is_none")] pub receive_amount: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetBfusdSubscriptionHistoryResponseRowsInner { #[must_use] pub fn new() -> GetBfusdSubscriptionHistoryResponseRowsInner { GetBfusdSubscriptionHistoryResponseRowsInner { time: None, asset: None, amount: None, receive_asset: None, receive_amount: None, status: None, } } } src/simple_earn/rest_api/models/get_collateral_record_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCollateralRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetCollateralRecordResponse { #[must_use] pub fn new() -> GetCollateralRecordResponse { GetCollateralRecordResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_collateral_record_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCollateralRecordResponseRowsInner { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "productId", skip_serializing_if = "Option::is_none")] pub product_id: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "productName", skip_serializing_if = "Option::is_none")] pub product_name: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, } impl GetCollateralRecordResponseRowsInner { #[must_use] pub fn new() -> GetCollateralRecordResponseRowsInner { GetCollateralRecordResponseRowsInner { amount: None, product_id: None, asset: None, create_time: None, r#type: None, product_name: None, order_id: None, } } } src/simple_earn/rest_api/models/get_flexible_personal_left_quota_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexiblePersonalLeftQuotaResponse { #[serde(rename = "leftPersonalQuota", skip_serializing_if = "Option::is_none")] pub left_personal_quota: Option, } impl GetFlexiblePersonalLeftQuotaResponse { #[must_use] pub fn new() -> GetFlexiblePersonalLeftQuotaResponse { GetFlexiblePersonalLeftQuotaResponse { left_personal_quota: None, } } } src/simple_earn/rest_api/models/get_flexible_product_position_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleProductPositionResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleProductPositionResponse { #[must_use] pub fn new() -> GetFlexibleProductPositionResponse { GetFlexibleProductPositionResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_flexible_product_position_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleProductPositionResponseRowsInner { #[serde(rename = "totalAmount", skip_serializing_if = "Option::is_none")] pub total_amount: Option, #[serde( rename = "tierAnnualPercentageRate", skip_serializing_if = "Option::is_none" )] pub tier_annual_percentage_rate: Option>, #[serde( rename = "latestAnnualPercentageRate", skip_serializing_if = "Option::is_none" )] pub latest_annual_percentage_rate: Option, #[serde( rename = "yesterdayAirdropPercentageRate", skip_serializing_if = "Option::is_none" )] pub yesterday_airdrop_percentage_rate: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "airDropAsset", skip_serializing_if = "Option::is_none")] pub air_drop_asset: Option, #[serde(rename = "canRedeem", skip_serializing_if = "Option::is_none")] pub can_redeem: Option, #[serde(rename = "collateralAmount", skip_serializing_if = "Option::is_none")] pub collateral_amount: Option, #[serde(rename = "productId", skip_serializing_if = "Option::is_none")] pub product_id: Option, #[serde( rename = "yesterdayRealTimeRewards", skip_serializing_if = "Option::is_none" )] pub yesterday_real_time_rewards: Option, #[serde( rename = "cumulativeBonusRewards", skip_serializing_if = "Option::is_none" )] pub cumulative_bonus_rewards: Option, #[serde( rename = "cumulativeRealTimeRewards", skip_serializing_if = "Option::is_none" )] pub cumulative_real_time_rewards: Option, #[serde( rename = "cumulativeTotalRewards", skip_serializing_if = "Option::is_none" )] pub cumulative_total_rewards: Option, #[serde(rename = "autoSubscribe", skip_serializing_if = "Option::is_none")] pub auto_subscribe: Option, } impl GetFlexibleProductPositionResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleProductPositionResponseRowsInner { GetFlexibleProductPositionResponseRowsInner { total_amount: None, tier_annual_percentage_rate: None, latest_annual_percentage_rate: None, yesterday_airdrop_percentage_rate: None, asset: None, air_drop_asset: None, can_redeem: None, collateral_amount: None, product_id: None, yesterday_real_time_rewards: None, cumulative_bonus_rewards: None, cumulative_real_time_rewards: None, cumulative_total_rewards: None, auto_subscribe: None, } } } src/simple_earn/rest_api/models/get_flexible_product_position_response_rows_inner_tier_annual_percentage_rate.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleProductPositionResponseRowsInnerTierAnnualPercentageRate { #[serde(rename = "0-5BTC", skip_serializing_if = "Option::is_none")] pub param_0_5_btc: Option, #[serde(rename = "5-10BTC", skip_serializing_if = "Option::is_none")] pub param_5_10_btc: Option, } impl GetFlexibleProductPositionResponseRowsInnerTierAnnualPercentageRate { #[must_use] pub fn new() -> GetFlexibleProductPositionResponseRowsInnerTierAnnualPercentageRate { GetFlexibleProductPositionResponseRowsInnerTierAnnualPercentageRate { param_0_5_btc: None, param_5_10_btc: None, } } } src/simple_earn/rest_api/models/get_flexible_redemption_record_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleRedemptionRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleRedemptionRecordResponse { #[must_use] pub fn new() -> GetFlexibleRedemptionRecordResponse { GetFlexibleRedemptionRecordResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_flexible_redemption_record_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleRedemptionRecordResponseRowsInner { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")] pub project_id: Option, #[serde(rename = "redeemId", skip_serializing_if = "Option::is_none")] pub redeem_id: Option, #[serde(rename = "destAccount", skip_serializing_if = "Option::is_none")] pub dest_account: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetFlexibleRedemptionRecordResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleRedemptionRecordResponseRowsInner { GetFlexibleRedemptionRecordResponseRowsInner { amount: None, asset: None, time: None, project_id: None, redeem_id: None, dest_account: None, status: None, } } } src/simple_earn/rest_api/models/get_flexible_rewards_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleRewardsHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleRewardsHistoryResponse { #[must_use] pub fn new() -> GetFlexibleRewardsHistoryResponse { GetFlexibleRewardsHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_flexible_rewards_history_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleRewardsHistoryResponseRowsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "rewards", skip_serializing_if = "Option::is_none")] pub rewards: Option, #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")] pub project_id: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl GetFlexibleRewardsHistoryResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleRewardsHistoryResponseRowsInner { GetFlexibleRewardsHistoryResponseRowsInner { asset: None, rewards: None, project_id: None, r#type: None, time: None, } } } src/simple_earn/rest_api/models/get_flexible_subscription_preview_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleSubscriptionPreviewResponse { #[serde(rename = "totalAmount", skip_serializing_if = "Option::is_none")] pub total_amount: Option, #[serde(rename = "rewardAsset", skip_serializing_if = "Option::is_none")] pub reward_asset: Option, #[serde(rename = "airDropAsset", skip_serializing_if = "Option::is_none")] pub air_drop_asset: Option, #[serde( rename = "estDailyBonusRewards", skip_serializing_if = "Option::is_none" )] pub est_daily_bonus_rewards: Option, #[serde( rename = "estDailyRealTimeRewards", skip_serializing_if = "Option::is_none" )] pub est_daily_real_time_rewards: Option, #[serde( rename = "estDailyAirdropRewards", skip_serializing_if = "Option::is_none" )] pub est_daily_airdrop_rewards: Option, } impl GetFlexibleSubscriptionPreviewResponse { #[must_use] pub fn new() -> GetFlexibleSubscriptionPreviewResponse { GetFlexibleSubscriptionPreviewResponse { total_amount: None, reward_asset: None, air_drop_asset: None, est_daily_bonus_rewards: None, est_daily_real_time_rewards: None, est_daily_airdrop_rewards: None, } } } src/simple_earn/rest_api/models/get_flexible_subscription_record_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleSubscriptionRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetFlexibleSubscriptionRecordResponse { #[must_use] pub fn new() -> GetFlexibleSubscriptionRecordResponse { GetFlexibleSubscriptionRecordResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_flexible_subscription_record_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFlexibleSubscriptionRecordResponseRowsInner { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "purchaseId", skip_serializing_if = "Option::is_none")] pub purchase_id: Option, #[serde(rename = "productId", skip_serializing_if = "Option::is_none")] pub product_id: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "sourceAccount", skip_serializing_if = "Option::is_none")] pub source_account: Option, #[serde(rename = "amtFromSpot", skip_serializing_if = "Option::is_none")] pub amt_from_spot: Option, #[serde(rename = "amtFromFunding", skip_serializing_if = "Option::is_none")] pub amt_from_funding: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetFlexibleSubscriptionRecordResponseRowsInner { #[must_use] pub fn new() -> GetFlexibleSubscriptionRecordResponseRowsInner { GetFlexibleSubscriptionRecordResponseRowsInner { amount: None, asset: None, time: None, purchase_id: None, product_id: None, r#type: None, source_account: None, amt_from_spot: None, amt_from_funding: None, status: None, } } } src/simple_earn/rest_api/models/get_locked_personal_left_quota_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLockedPersonalLeftQuotaResponse { #[serde(rename = "leftPersonalQuota", skip_serializing_if = "Option::is_none")] pub left_personal_quota: Option, } impl GetLockedPersonalLeftQuotaResponse { #[must_use] pub fn new() -> GetLockedPersonalLeftQuotaResponse { GetLockedPersonalLeftQuotaResponse { left_personal_quota: None, } } } src/simple_earn/rest_api/models/get_locked_product_position_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLockedProductPositionResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetLockedProductPositionResponse { #[must_use] pub fn new() -> GetLockedProductPositionResponse { GetLockedProductPositionResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_locked_redemption_record_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLockedRedemptionRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetLockedRedemptionRecordResponse { #[must_use] pub fn new() -> GetLockedRedemptionRecordResponse { GetLockedRedemptionRecordResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_locked_redemption_record_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLockedRedemptionRecordResponseRowsInner { #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")] pub position_id: Option, #[serde(rename = "redeemId", skip_serializing_if = "Option::is_none")] pub redeem_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "lockPeriod", skip_serializing_if = "Option::is_none")] pub lock_period: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "originalAmount", skip_serializing_if = "Option::is_none")] pub original_amount: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "deliverDate", skip_serializing_if = "Option::is_none")] pub deliver_date: Option, #[serde(rename = "lossAmount", skip_serializing_if = "Option::is_none")] pub loss_amount: Option, #[serde(rename = "isComplete", skip_serializing_if = "Option::is_none")] pub is_complete: Option, #[serde(rename = "rewardAsset", skip_serializing_if = "Option::is_none")] pub reward_asset: Option, #[serde(rename = "rewardAmt", skip_serializing_if = "Option::is_none")] pub reward_amt: Option, #[serde(rename = "extraRewardAsset", skip_serializing_if = "Option::is_none")] pub extra_reward_asset: Option, #[serde(rename = "estExtraRewardAmt", skip_serializing_if = "Option::is_none")] pub est_extra_reward_amt: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetLockedRedemptionRecordResponseRowsInner { #[must_use] pub fn new() -> GetLockedRedemptionRecordResponseRowsInner { GetLockedRedemptionRecordResponseRowsInner { position_id: None, redeem_id: None, time: None, asset: None, lock_period: None, amount: None, original_amount: None, r#type: None, deliver_date: None, loss_amount: None, is_complete: None, reward_asset: None, reward_amt: None, extra_reward_asset: None, est_extra_reward_amt: None, status: None, } } } src/simple_earn/rest_api/models/get_locked_rewards_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLockedRewardsHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetLockedRewardsHistoryResponse { #[must_use] pub fn new() -> GetLockedRewardsHistoryResponse { GetLockedRewardsHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_locked_rewards_history_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLockedRewardsHistoryResponseRowsInner { #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")] pub position_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "lockPeriod", skip_serializing_if = "Option::is_none")] pub lock_period: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, } impl GetLockedRewardsHistoryResponseRowsInner { #[must_use] pub fn new() -> GetLockedRewardsHistoryResponseRowsInner { GetLockedRewardsHistoryResponseRowsInner { position_id: None, time: None, asset: None, lock_period: None, amount: None, r#type: None, } } } src/simple_earn/rest_api/models/get_locked_subscription_preview_response_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLockedSubscriptionPreviewResponseInner { #[serde(rename = "rewardAsset", skip_serializing_if = "Option::is_none")] pub reward_asset: Option, #[serde(rename = "totalRewardAmt", skip_serializing_if = "Option::is_none")] pub total_reward_amt: Option, #[serde(rename = "extraRewardAsset", skip_serializing_if = "Option::is_none")] pub extra_reward_asset: Option, #[serde( rename = "estTotalExtraRewardAmt", skip_serializing_if = "Option::is_none" )] pub est_total_extra_reward_amt: Option, #[serde(rename = "boostRewardAsset", skip_serializing_if = "Option::is_none")] pub boost_reward_asset: Option, #[serde(rename = "estDailyRewardAmt", skip_serializing_if = "Option::is_none")] pub est_daily_reward_amt: Option, #[serde(rename = "nextPay", skip_serializing_if = "Option::is_none")] pub next_pay: Option, #[serde(rename = "nextPayDate", skip_serializing_if = "Option::is_none")] pub next_pay_date: Option, #[serde(rename = "valueDate", skip_serializing_if = "Option::is_none")] pub value_date: Option, #[serde(rename = "rewardsEndDate", skip_serializing_if = "Option::is_none")] pub rewards_end_date: Option, #[serde(rename = "deliverDate", skip_serializing_if = "Option::is_none")] pub deliver_date: Option, #[serde( rename = "nextSubscriptionDate", skip_serializing_if = "Option::is_none" )] pub next_subscription_date: Option, } impl GetLockedSubscriptionPreviewResponseInner { #[must_use] pub fn new() -> GetLockedSubscriptionPreviewResponseInner { GetLockedSubscriptionPreviewResponseInner { reward_asset: None, total_reward_amt: None, extra_reward_asset: None, est_total_extra_reward_amt: None, boost_reward_asset: None, est_daily_reward_amt: None, next_pay: None, next_pay_date: None, value_date: None, rewards_end_date: None, deliver_date: None, next_subscription_date: None, } } } src/simple_earn/rest_api/models/get_locked_subscription_record_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLockedSubscriptionRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetLockedSubscriptionRecordResponse { #[must_use] pub fn new() -> GetLockedSubscriptionRecordResponse { GetLockedSubscriptionRecordResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_locked_subscription_record_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLockedSubscriptionRecordResponseRowsInner { #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")] pub position_id: Option, #[serde(rename = "purchaseId", skip_serializing_if = "Option::is_none")] pub purchase_id: Option, #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")] pub project_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "lockPeriod", skip_serializing_if = "Option::is_none")] pub lock_period: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "sourceAccount", skip_serializing_if = "Option::is_none")] pub source_account: Option, #[serde(rename = "amtFromSpot", skip_serializing_if = "Option::is_none")] pub amt_from_spot: Option, #[serde(rename = "amtFromFunding", skip_serializing_if = "Option::is_none")] pub amt_from_funding: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetLockedSubscriptionRecordResponseRowsInner { #[must_use] pub fn new() -> GetLockedSubscriptionRecordResponseRowsInner { GetLockedSubscriptionRecordResponseRowsInner { position_id: None, purchase_id: None, project_id: None, time: None, asset: None, amount: None, lock_period: None, r#type: None, source_account: None, amt_from_spot: None, amt_from_funding: None, status: None, } } } src/simple_earn/rest_api/models/get_rate_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRateHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetRateHistoryResponse { #[must_use] pub fn new() -> GetRateHistoryResponse { GetRateHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_rate_history_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRateHistoryResponseRowsInner { #[serde(rename = "productId", skip_serializing_if = "Option::is_none")] pub product_id: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde( rename = "annualPercentageRate", skip_serializing_if = "Option::is_none" )] pub annual_percentage_rate: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl GetRateHistoryResponseRowsInner { #[must_use] pub fn new() -> GetRateHistoryResponseRowsInner { GetRateHistoryResponseRowsInner { product_id: None, asset: None, annual_percentage_rate: None, time: None, } } } src/simple_earn/rest_api/models/get_rwusd_account_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdAccountResponse { #[serde(rename = "rwusdAmount", skip_serializing_if = "Option::is_none")] pub rwusd_amount: Option, #[serde(rename = "totalProfit", skip_serializing_if = "Option::is_none")] pub total_profit: Option, } impl GetRwusdAccountResponse { #[must_use] pub fn new() -> GetRwusdAccountResponse { GetRwusdAccountResponse { rwusd_amount: None, total_profit: None, } } } src/simple_earn/rest_api/models/get_rwusd_quota_details_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdQuotaDetailsResponse { #[serde(rename = "subscriptionQuota", skip_serializing_if = "Option::is_none")] pub subscription_quota: Option>, #[serde( rename = "fastRedemptionQuota", skip_serializing_if = "Option::is_none" )] pub fast_redemption_quota: Option>, #[serde( rename = "standardRedemptionQuota", skip_serializing_if = "Option::is_none" )] pub standard_redemption_quota: Option>, #[serde(rename = "subscribeEnable", skip_serializing_if = "Option::is_none")] pub subscribe_enable: Option, #[serde(rename = "redeemEnable", skip_serializing_if = "Option::is_none")] pub redeem_enable: Option, } impl GetRwusdQuotaDetailsResponse { #[must_use] pub fn new() -> GetRwusdQuotaDetailsResponse { GetRwusdQuotaDetailsResponse { subscription_quota: None, fast_redemption_quota: None, standard_redemption_quota: None, subscribe_enable: None, redeem_enable: None, } } } src/simple_earn/rest_api/models/get_rwusd_quota_details_response_fast_redemption_quota.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdQuotaDetailsResponseFastRedemptionQuota { #[serde(rename = "leftQuota", skip_serializing_if = "Option::is_none")] pub left_quota: Option, #[serde(rename = "minimum", skip_serializing_if = "Option::is_none")] pub minimum: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "freeQuota", skip_serializing_if = "Option::is_none")] pub free_quota: Option, } impl GetRwusdQuotaDetailsResponseFastRedemptionQuota { #[must_use] pub fn new() -> GetRwusdQuotaDetailsResponseFastRedemptionQuota { GetRwusdQuotaDetailsResponseFastRedemptionQuota { left_quota: None, minimum: None, fee: None, free_quota: None, } } } src/simple_earn/rest_api/models/get_rwusd_quota_details_response_standard_redemption_quota.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdQuotaDetailsResponseStandardRedemptionQuota { #[serde(rename = "leftQuota", skip_serializing_if = "Option::is_none")] pub left_quota: Option, #[serde(rename = "minimum", skip_serializing_if = "Option::is_none")] pub minimum: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "redeemPeriod", skip_serializing_if = "Option::is_none")] pub redeem_period: Option, } impl GetRwusdQuotaDetailsResponseStandardRedemptionQuota { #[must_use] pub fn new() -> GetRwusdQuotaDetailsResponseStandardRedemptionQuota { GetRwusdQuotaDetailsResponseStandardRedemptionQuota { left_quota: None, minimum: None, fee: None, redeem_period: None, } } } src/simple_earn/rest_api/models/get_rwusd_quota_details_response_subscription_quota.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdQuotaDetailsResponseSubscriptionQuota { #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "leftQuota", skip_serializing_if = "Option::is_none")] pub left_quota: Option, #[serde(rename = "minimum", skip_serializing_if = "Option::is_none")] pub minimum: Option, } impl GetRwusdQuotaDetailsResponseSubscriptionQuota { #[must_use] pub fn new() -> GetRwusdQuotaDetailsResponseSubscriptionQuota { GetRwusdQuotaDetailsResponseSubscriptionQuota { assets: None, left_quota: None, minimum: None, } } } src/simple_earn/rest_api/models/get_rwusd_rate_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdRateHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetRwusdRateHistoryResponse { #[must_use] pub fn new() -> GetRwusdRateHistoryResponse { GetRwusdRateHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_rwusd_redemption_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdRedemptionHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetRwusdRedemptionHistoryResponse { #[must_use] pub fn new() -> GetRwusdRedemptionHistoryResponse { GetRwusdRedemptionHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_rwusd_redemption_history_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdRedemptionHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "receiveAsset", skip_serializing_if = "Option::is_none")] pub receive_asset: Option, #[serde(rename = "receiveAmount", skip_serializing_if = "Option::is_none")] pub receive_amount: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "arrivalTime", skip_serializing_if = "Option::is_none")] pub arrival_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetRwusdRedemptionHistoryResponseRowsInner { #[must_use] pub fn new() -> GetRwusdRedemptionHistoryResponseRowsInner { GetRwusdRedemptionHistoryResponseRowsInner { time: None, asset: None, amount: None, receive_asset: None, receive_amount: None, fee: None, arrival_time: None, status: None, } } } src/simple_earn/rest_api/models/get_rwusd_rewards_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdRewardsHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetRwusdRewardsHistoryResponse { #[must_use] pub fn new() -> GetRwusdRewardsHistoryResponse { GetRwusdRewardsHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_rwusd_rewards_history_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdRewardsHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "rewardsAmount", skip_serializing_if = "Option::is_none")] pub rewards_amount: Option, #[serde(rename = "rwusdPosition", skip_serializing_if = "Option::is_none")] pub rwusd_position: Option, #[serde( rename = "annualPercentageRate", skip_serializing_if = "Option::is_none" )] pub annual_percentage_rate: Option, } impl GetRwusdRewardsHistoryResponseRowsInner { #[must_use] pub fn new() -> GetRwusdRewardsHistoryResponseRowsInner { GetRwusdRewardsHistoryResponseRowsInner { time: None, rewards_amount: None, rwusd_position: None, annual_percentage_rate: None, } } } src/simple_earn/rest_api/models/get_rwusd_subscription_history_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdSubscriptionHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetRwusdSubscriptionHistoryResponse { #[must_use] pub fn new() -> GetRwusdSubscriptionHistoryResponse { GetRwusdSubscriptionHistoryResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_rwusd_subscription_history_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetRwusdSubscriptionHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "receiveAsset", skip_serializing_if = "Option::is_none")] pub receive_asset: Option, #[serde(rename = "receiveAmount", skip_serializing_if = "Option::is_none")] pub receive_amount: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetRwusdSubscriptionHistoryResponseRowsInner { #[must_use] pub fn new() -> GetRwusdSubscriptionHistoryResponseRowsInner { GetRwusdSubscriptionHistoryResponseRowsInner { time: None, asset: None, amount: None, receive_asset: None, receive_amount: None, status: None, } } } src/simple_earn/rest_api/models/get_simple_earn_flexible_product_list_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSimpleEarnFlexibleProductListResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetSimpleEarnFlexibleProductListResponse { #[must_use] pub fn new() -> GetSimpleEarnFlexibleProductListResponse { GetSimpleEarnFlexibleProductListResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_simple_earn_flexible_product_list_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSimpleEarnFlexibleProductListResponseRowsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde( rename = "latestAnnualPercentageRate", skip_serializing_if = "Option::is_none" )] pub latest_annual_percentage_rate: Option, #[serde( rename = "tierAnnualPercentageRate", skip_serializing_if = "Option::is_none" )] pub tier_annual_percentage_rate: Option>, #[serde( rename = "airDropPercentageRate", skip_serializing_if = "Option::is_none" )] pub air_drop_percentage_rate: Option, #[serde(rename = "canPurchase", skip_serializing_if = "Option::is_none")] pub can_purchase: Option, #[serde(rename = "canRedeem", skip_serializing_if = "Option::is_none")] pub can_redeem: Option, #[serde(rename = "isSoldOut", skip_serializing_if = "Option::is_none")] pub is_sold_out: Option, #[serde(rename = "hot", skip_serializing_if = "Option::is_none")] pub hot: Option, #[serde(rename = "minPurchaseAmount", skip_serializing_if = "Option::is_none")] pub min_purchase_amount: Option, #[serde(rename = "productId", skip_serializing_if = "Option::is_none")] pub product_id: Option, #[serde( rename = "subscriptionStartTime", skip_serializing_if = "Option::is_none" )] pub subscription_start_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetSimpleEarnFlexibleProductListResponseRowsInner { #[must_use] pub fn new() -> GetSimpleEarnFlexibleProductListResponseRowsInner { GetSimpleEarnFlexibleProductListResponseRowsInner { asset: None, latest_annual_percentage_rate: None, tier_annual_percentage_rate: None, air_drop_percentage_rate: None, can_purchase: None, can_redeem: None, is_sold_out: None, hot: None, min_purchase_amount: None, product_id: None, subscription_start_time: None, status: None, } } } src/simple_earn/rest_api/models/get_simple_earn_locked_product_list_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSimpleEarnLockedProductListResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetSimpleEarnLockedProductListResponse { #[must_use] pub fn new() -> GetSimpleEarnLockedProductListResponse { GetSimpleEarnLockedProductListResponse { rows: None, total: None, } } } src/simple_earn/rest_api/models/get_simple_earn_locked_product_list_response_rows_inner.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSimpleEarnLockedProductListResponseRowsInner { #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")] pub project_id: Option, #[serde(rename = "detail", skip_serializing_if = "Option::is_none")] pub detail: Option>, #[serde(rename = "quota", skip_serializing_if = "Option::is_none")] pub quota: Option>, } impl GetSimpleEarnLockedProductListResponseRowsInner { #[must_use] pub fn new() -> GetSimpleEarnLockedProductListResponseRowsInner { GetSimpleEarnLockedProductListResponseRowsInner { project_id: None, detail: None, quota: None, } } } src/simple_earn/rest_api/models/get_simple_earn_locked_product_list_response_rows_inner_detail.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSimpleEarnLockedProductListResponseRowsInnerDetail { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "rewardAsset", skip_serializing_if = "Option::is_none")] pub reward_asset: Option, #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] pub duration: Option, #[serde(rename = "renewable", skip_serializing_if = "Option::is_none")] pub renewable: Option, #[serde(rename = "isSoldOut", skip_serializing_if = "Option::is_none")] pub is_sold_out: Option, #[serde(rename = "apr", skip_serializing_if = "Option::is_none")] pub apr: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde( rename = "subscriptionStartTime", skip_serializing_if = "Option::is_none" )] pub subscription_start_time: Option, #[serde(rename = "extraRewardAsset", skip_serializing_if = "Option::is_none")] pub extra_reward_asset: Option, #[serde(rename = "extraRewardAPR", skip_serializing_if = "Option::is_none")] pub extra_reward_apr: Option, #[serde(rename = "boostRewardAsset", skip_serializing_if = "Option::is_none")] pub boost_reward_asset: Option, #[serde(rename = "boostApr", skip_serializing_if = "Option::is_none")] pub boost_apr: Option, #[serde(rename = "boostEndTime", skip_serializing_if = "Option::is_none")] pub boost_end_time: Option, } impl GetSimpleEarnLockedProductListResponseRowsInnerDetail { #[must_use] pub fn new() -> GetSimpleEarnLockedProductListResponseRowsInnerDetail { GetSimpleEarnLockedProductListResponseRowsInnerDetail { asset: None, reward_asset: None, duration: None, renewable: None, is_sold_out: None, apr: None, status: None, subscription_start_time: None, extra_reward_asset: None, extra_reward_apr: None, boost_reward_asset: None, boost_apr: None, boost_end_time: None, } } } src/simple_earn/rest_api/models/get_simple_earn_locked_product_list_response_rows_inner_quota.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSimpleEarnLockedProductListResponseRowsInnerQuota { #[serde(rename = "totalPersonalQuota", skip_serializing_if = "Option::is_none")] pub total_personal_quota: Option, #[serde(rename = "minimum", skip_serializing_if = "Option::is_none")] pub minimum: Option, } impl GetSimpleEarnLockedProductListResponseRowsInnerQuota { #[must_use] pub fn new() -> GetSimpleEarnLockedProductListResponseRowsInnerQuota { GetSimpleEarnLockedProductListResponseRowsInnerQuota { total_personal_quota: None, minimum: None, } } } src/simple_earn/rest_api/models/redeem_bfusd_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RedeemBfusdResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "receiveAmount", skip_serializing_if = "Option::is_none")] pub receive_amount: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "arrivalTime", skip_serializing_if = "Option::is_none")] pub arrival_time: Option, } impl RedeemBfusdResponse { #[must_use] pub fn new() -> RedeemBfusdResponse { RedeemBfusdResponse { success: None, receive_amount: None, fee: None, arrival_time: None, } } } src/simple_earn/rest_api/models/redeem_flexible_product_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RedeemFlexibleProductResponse { #[serde(rename = "redeemId", skip_serializing_if = "Option::is_none")] pub redeem_id: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl RedeemFlexibleProductResponse { #[must_use] pub fn new() -> RedeemFlexibleProductResponse { RedeemFlexibleProductResponse { redeem_id: None, success: None, } } } src/simple_earn/rest_api/models/redeem_locked_product_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RedeemLockedProductResponse { #[serde(rename = "redeemId", skip_serializing_if = "Option::is_none")] pub redeem_id: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl RedeemLockedProductResponse { #[must_use] pub fn new() -> RedeemLockedProductResponse { RedeemLockedProductResponse { redeem_id: None, success: None, } } } src/simple_earn/rest_api/models/redeem_rwusd_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RedeemRwusdResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "receiveAmount", skip_serializing_if = "Option::is_none")] pub receive_amount: Option, #[serde(rename = "fee", skip_serializing_if = "Option::is_none")] pub fee: Option, #[serde(rename = "arrivalTime", skip_serializing_if = "Option::is_none")] pub arrival_time: Option, } impl RedeemRwusdResponse { #[must_use] pub fn new() -> RedeemRwusdResponse { RedeemRwusdResponse { success: None, receive_amount: None, fee: None, arrival_time: None, } } } src/simple_earn/rest_api/models/set_flexible_auto_subscribe_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SetFlexibleAutoSubscribeResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl SetFlexibleAutoSubscribeResponse { #[must_use] pub fn new() -> SetFlexibleAutoSubscribeResponse { SetFlexibleAutoSubscribeResponse { success: None } } } src/simple_earn/rest_api/models/set_locked_auto_subscribe_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SetLockedAutoSubscribeResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl SetLockedAutoSubscribeResponse { #[must_use] pub fn new() -> SetLockedAutoSubscribeResponse { SetLockedAutoSubscribeResponse { success: None } } } src/simple_earn/rest_api/models/set_locked_product_redeem_option_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SetLockedProductRedeemOptionResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl SetLockedProductRedeemOptionResponse { #[must_use] pub fn new() -> SetLockedProductRedeemOptionResponse { SetLockedProductRedeemOptionResponse { success: None } } } src/simple_earn/rest_api/models/simple_account_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SimpleAccountResponse { #[serde(rename = "totalAmountInBTC", skip_serializing_if = "Option::is_none")] pub total_amount_in_btc: Option, #[serde(rename = "totalAmountInUSDT", skip_serializing_if = "Option::is_none")] pub total_amount_in_usdt: Option, #[serde( rename = "totalFlexibleAmountInBTC", skip_serializing_if = "Option::is_none" )] pub total_flexible_amount_in_btc: Option, #[serde( rename = "totalFlexibleAmountInUSDT", skip_serializing_if = "Option::is_none" )] pub total_flexible_amount_in_usdt: Option, #[serde(rename = "totalLockedInBTC", skip_serializing_if = "Option::is_none")] pub total_locked_in_btc: Option, #[serde(rename = "totalLockedInUSDT", skip_serializing_if = "Option::is_none")] pub total_locked_in_usdt: Option, } impl SimpleAccountResponse { #[must_use] pub fn new() -> SimpleAccountResponse { SimpleAccountResponse { total_amount_in_btc: None, total_amount_in_usdt: None, total_flexible_amount_in_btc: None, total_flexible_amount_in_usdt: None, total_locked_in_btc: None, total_locked_in_usdt: None, } } } src/simple_earn/rest_api/models/subscribe_bfusd_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubscribeBfusdResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "bfusdAmount", skip_serializing_if = "Option::is_none")] pub bfusd_amount: Option, } impl SubscribeBfusdResponse { #[must_use] pub fn new() -> SubscribeBfusdResponse { SubscribeBfusdResponse { success: None, bfusd_amount: None, } } } src/simple_earn/rest_api/models/subscribe_flexible_product_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubscribeFlexibleProductResponse { #[serde(rename = "purchaseId", skip_serializing_if = "Option::is_none")] pub purchase_id: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl SubscribeFlexibleProductResponse { #[must_use] pub fn new() -> SubscribeFlexibleProductResponse { SubscribeFlexibleProductResponse { purchase_id: None, success: None, } } } src/simple_earn/rest_api/models/subscribe_locked_product_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubscribeLockedProductResponse { #[serde(rename = "purchaseId", skip_serializing_if = "Option::is_none")] pub purchase_id: Option, #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")] pub position_id: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl SubscribeLockedProductResponse { #[must_use] pub fn new() -> SubscribeLockedProductResponse { SubscribeLockedProductResponse { purchase_id: None, position_id: None, success: None, } } } src/simple_earn/rest_api/models/subscribe_rwusd_response.rs /* * Binance Simple Earn REST API * * OpenAPI Specification for the Binance Simple Earn REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::simple_earn::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubscribeRwusdResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "rwusdAmount", skip_serializing_if = "Option::is_none")] pub rwusd_amount: Option, } impl SubscribeRwusdResponse { #[must_use] pub fn new() -> SubscribeRwusdResponse { SubscribeRwusdResponse { success: None, rwusd_amount: None, } } } src/spot/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::spot; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = spot::SpotRestApi::production(configuration); let params = spot::rest_api::ExchangeInfoParams::default(); let response = client.exchange_info(params).await?; ``` src/spot/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = spot::SpotRestApi::production(configuration); let params = spot::rest_api::ExchangeInfoParams::default(); let response = client.exchange_info(params).await?; ``` src/spot/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::spot; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = spot::SpotRestApi::production(configuration); let params = spot::rest_api::ExchangeInfoParams::default(); match client.exchange_info(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/spot/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::spot; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = spot::SpotRestApi::production(configuration); let params = spot::rest_api::ExchangeInfoParams::default(); let response = client.exchange_info(params).await?; ``` src/spot/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = spot::SpotRestApi::production(configuration); let params = spot::rest_api::ExchangeInfoParams::default(); let response = client.exchange_info(params).await?; ``` src/spot/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = spot::SpotRestApi::production(configuration); let params = spot::rest_api::ExchangeInfoParams::default(); let response = client.exchange_info(params).await?; ``` src/spot/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::spot; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = spot::SpotRestApi::production(configuration); let params = spot::rest_api::ExchangeInfoParams::default(); let response = client.exchange_info(params).await?; ``` src/spot/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = spot::SpotRestApi::production(configuration); let params = spot::rest_api::ExchangeInfoParams::default(); let response = client.exchange_info(params).await?; ``` src/spot/docs/rest_api/time-unit.md # Timeout ```rust use binance_sdk::spot; use binance_sdk::config; use binance_sdk::models; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .time_unit(models::TimeUnit::Microsecond) // Set time unit to microseconds .build()?; let client = spot::SpotRestApi::production(configuration); let params = spot::rest_api::ExchangeInfoParams::default(); let response = client.exchange_info(params).await?; ``` src/spot/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = spot::SpotRestApi::production(configuration); let params = spot::rest_api::ExchangeInfoParams::default(); let response = client.exchange_info(params).await?; ``` src/spot/docs/websocket_api/agent.md # WebSocket Agent Configuration ```rust use tokio_tungstenite::Connector; use native_tls::{TlsConnector, Protocol}; use binance_sdk::spot; use binance_sdk::config; let native_tls = TlsConnector::builder() .min_protocol_version(Some(Protocol::Tlsv12)) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = spot::SpotWsApi::production(configuration); let connection = client.connect().await?; let params = spot::websocket_api::ExchangeInfoParams::default(); let response = connection.exchange_info(params).await?; ``` src/spot/docs/websocket_api/certificate-pinning.md # WebSocket Agent Configuration ```rust use std::fs; use tokio_tungstenite::Connector; use native_tls::{Certificate, TlsConnector, Protocol}; use binance_sdk::spot; use binance_sdk::config; let cert_pem = fs::read("/path/to/pinned_cert.pem")?; let cert = Certificate::from_pem(&cert_pem)?; let native_tls = TlsConnector::builder() .add_root_certificate(cert) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = spot::SpotWsApi::production(configuration); let connection = client.connect().await?; let params = spot::websocket_api::ExchangeInfoParams::default(); let response = connection.exchange_info(params).await?; ``` src/spot/docs/websocket_api/connection-mode.md # Connection Mode Configuration ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .mode(models::WebsocketMode::Pool(3)) // Use pool mode with a pool size of 3 .build()?; let client = spot::SpotWsApi::production(configuration); let connection = client.connect().await?; let params = spot::websocket_api::ExchangeInfoParams::default(); let response = connection.exchange_info(params).await?; ``` src/spot/docs/websocket_api/key-pair-authentication.md # Private Key Configuration ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = spot::SpotWsApi::production(configuration); let connection = client.connect().await?; let params = spot::websocket_api::ExchangeInfoParams::default(); let response = connection.exchange_info(params).await?; ``` src/spot/docs/websocket_api/reconnect-delay.md # Reconnect Delay Configuration ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .reconnect_delay(3000) // Set reconnect delay to 3 seconds .build()?; let client = spot::SpotWsApi::production(configuration); let connection = client.connect().await?; let params = spot::websocket_api::ExchangeInfoParams::default(); let response = connection.exchange_info(params).await?; ``` src/spot/docs/websocket_api/time-unit.md # Time Unit Configuration ```rust use binance_sdk::spot; use binance_sdk::config; use binance_sdk::models; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .time_unit(models::TimeUnit::Microsecond) // Set time unit to microseconds .build()?; let client = spot::SpotWsApi::production(configuration); let connection = client.connect().await?; let params = spot::websocket_api::ExchangeInfoParams::default(); let response = connection.exchange_info(params).await?; ``` src/spot/docs/websocket_api/timeout.md # Timeout Configuration ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(10000) // Set timeout to 10 seconds .build()?; let client = spot::SpotWsApi::production(configuration); let connection = client.connect().await?; let params = spot::websocket_api::ExchangeInfoParams::default(); let response = connection.exchange_info(params).await?; ``` src/spot/docs/websocket_streams/agent.md # WebSocket Agent Configuration ```rust use tokio_tungstenite::Connector; use native_tls::{TlsConnector, Protocol}; use binance_sdk::spot; use binance_sdk::config; let native_tls = TlsConnector::builder() .min_protocol_version(Some(Protocol::Tlsv12)) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = spot::SpotWsStreams::production(configuration); let connection = client.connect().await?; let params = spot::websocket_streams::AggTradeParams::default(); let stream = connection.agg_trade(params).await?; ``` src/spot/docs/websocket_streams/certificate-pinning.md # WebSocket Agent Configuration ```rust use std::fs; use tokio_tungstenite::Connector; use native_tls::{Certificate, TlsConnector, Protocol}; use binance_sdk::spot; use binance_sdk::config; let cert_pem = fs::read("/path/to/pinned_cert.pem")?; let cert = Certificate::from_pem(&cert_pem)?; let native_tls = TlsConnector::builder() .add_root_certificate(cert) .build()?; let ws_connector = Connector::NativeTls(native_tls); let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(config::AgentConnector(ws_connector)) .build()?; let client = spot::SpotWsStreams::production(configuration); let connection = client.connect().await?; let params = spot::websocket_streams::AggTradeParams::default(); let stream = connection.agg_trade(params).await?; ``` src/spot/docs/websocket_streams/connection-mode.md # Connection Mode Configuration ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .mode(models::WebsocketMode::Pool(3)) // Use pool mode with a pool size of 3 .build()?; let client = spot::SpotWsStreams::production(configuration); let connection = client.connect().await?; let params = spot::websocket_streams::AggTradeParams::default(); let stream = connection.agg_trade(params).await?; ``` src/spot/docs/websocket_streams/reconnect-delay.md # Reconnect Delay Configuration ```rust use binance_sdk::spot; use binance_sdk::config; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .reconnect_delay(3000) // Set reconnect delay to 3 seconds .build()?; let client = spot::SpotWsStreams::production(configuration); let connection = client.connect().await?; let params = spot::websocket_streams::AggTradeParams::default(); let stream = connection.agg_trade(params).await?; ``` src/spot/docs/websocket_streams/time-unit.md # Time Unit Configuration ```rust use binance_sdk::spot; use binance_sdk::config; use binance_sdk::models; let configuration = config::ConfigurationWebsocketApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .time_unit(models::TimeUnit::Microsecond) // Set time unit to microseconds .build()?; let client = spot::SpotWsStreams::production(configuration); let connection = client.connect().await?; let params = spot::websocket_streams::AggTradeParams::default(); let stream = connection.agg_trade(params).await?; ``` src/spot/rest_api/apis/mod.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod general_api; pub use general_api::*; pub mod market_api; pub use market_api::*; pub mod trade_api; pub use trade_api::*; src/spot/rest_api/models/account_commission_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "standardCommission", skip_serializing_if = "Option::is_none")] pub standard_commission: Option>, #[serde(rename = "specialCommission", skip_serializing_if = "Option::is_none")] pub special_commission: Option>, #[serde(rename = "taxCommission", skip_serializing_if = "Option::is_none")] pub tax_commission: Option>, #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] pub discount: Option>, } impl AccountCommissionResponse { #[must_use] pub fn new() -> AccountCommissionResponse { AccountCommissionResponse { symbol: None, standard_commission: None, special_commission: None, tax_commission: None, discount: None, } } } src/spot/rest_api/models/account_commission_response_discount.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponseDiscount { #[serde(rename = "enabledForAccount", skip_serializing_if = "Option::is_none")] pub enabled_for_account: Option, #[serde(rename = "enabledForSymbol", skip_serializing_if = "Option::is_none")] pub enabled_for_symbol: Option, #[serde(rename = "discountAsset", skip_serializing_if = "Option::is_none")] pub discount_asset: Option, #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] pub discount: Option, } impl AccountCommissionResponseDiscount { #[must_use] pub fn new() -> AccountCommissionResponseDiscount { AccountCommissionResponseDiscount { enabled_for_account: None, enabled_for_symbol: None, discount_asset: None, discount: None, } } } src/spot/rest_api/models/account_commission_response_special_commission.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponseSpecialCommission { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "seller", skip_serializing_if = "Option::is_none")] pub seller: Option, } impl AccountCommissionResponseSpecialCommission { #[must_use] pub fn new() -> AccountCommissionResponseSpecialCommission { AccountCommissionResponseSpecialCommission { maker: None, taker: None, buyer: None, seller: None, } } } src/spot/rest_api/models/account_commission_response_standard_commission.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponseStandardCommission { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "seller", skip_serializing_if = "Option::is_none")] pub seller: Option, } impl AccountCommissionResponseStandardCommission { #[must_use] pub fn new() -> AccountCommissionResponseStandardCommission { AccountCommissionResponseStandardCommission { maker: None, taker: None, buyer: None, seller: None, } } } src/spot/rest_api/models/account_commission_response_tax_commission.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponseTaxCommission { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "seller", skip_serializing_if = "Option::is_none")] pub seller: Option, } impl AccountCommissionResponseTaxCommission { #[must_use] pub fn new() -> AccountCommissionResponseTaxCommission { AccountCommissionResponseTaxCommission { maker: None, taker: None, buyer: None, seller: None, } } } src/spot/rest_api/models/agg_trades_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AggTradesResponseInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, #[serde(rename = "M", skip_serializing_if = "Option::is_none")] pub m_uppercase: Option, } impl AggTradesResponseInner { #[must_use] pub fn new() -> AggTradesResponseInner { AggTradesResponseInner { a: None, p: None, q: None, f: None, l: None, t_uppercase: None, m: None, m_uppercase: None, } } } src/spot/rest_api/models/all_order_list_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllOrderListResponseInner { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl AllOrderListResponseInner { #[must_use] pub fn new() -> AllOrderListResponseInner { AllOrderListResponseInner { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, } } } src/spot/rest_api/models/all_order_list_response_inner_orders_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllOrderListResponseInnerOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl AllOrderListResponseInnerOrdersInner { #[must_use] pub fn new() -> AllOrderListResponseInnerOrdersInner { AllOrderListResponseInnerOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/rest_api/models/all_orders_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllOrdersResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "isWorking", skip_serializing_if = "Option::is_none")] pub is_working: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl AllOrdersResponseInner { #[must_use] pub fn new() -> AllOrdersResponseInner { AllOrdersResponseInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, iceberg_qty: None, time: None, update_time: None, is_working: None, orig_quote_order_qty: None, working_time: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/asset_filters.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "filterType")] pub enum AssetFilters { #[serde(rename = "MAX_ASSET")] MaxAsset(Box), } impl Default for AssetFilters { fn default() -> Self { Self::MaxAsset(Default::default()) } } src/spot/rest_api/models/avg_price_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AvgPriceResponse { #[serde(rename = "mins", skip_serializing_if = "Option::is_none")] pub mins: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, } impl AvgPriceResponse { #[must_use] pub fn new() -> AvgPriceResponse { AvgPriceResponse { mins: None, price: None, close_time: None, } } } src/spot/rest_api/models/delete_open_orders_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DeleteOpenOrdersResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl DeleteOpenOrdersResponseInner { #[must_use] pub fn new() -> DeleteOpenOrdersResponseInner { DeleteOpenOrdersResponseInner { symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/delete_order_list_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DeleteOrderListResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl DeleteOrderListResponse { #[must_use] pub fn new() -> DeleteOrderListResponse { DeleteOrderListResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/spot/rest_api/models/delete_order_list_response_order_reports_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DeleteOrderListResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl DeleteOrderListResponseOrderReportsInner { #[must_use] pub fn new() -> DeleteOrderListResponseOrderReportsInner { DeleteOrderListResponseOrderReportsInner { symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/delete_order_list_response_orders_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DeleteOrderListResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl DeleteOrderListResponseOrdersInner { #[must_use] pub fn new() -> DeleteOrderListResponseOrdersInner { DeleteOrderListResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/rest_api/models/delete_order_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DeleteOrderResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl DeleteOrderResponse { #[must_use] pub fn new() -> DeleteOrderResponse { DeleteOrderResponse { symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/depth_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepthResponse { #[serde(rename = "lastUpdateId", skip_serializing_if = "Option::is_none")] pub last_update_id: Option, #[serde(rename = "bids", skip_serializing_if = "Option::is_none")] pub bids: Option>>, #[serde(rename = "asks", skip_serializing_if = "Option::is_none")] pub asks: Option>>, } impl DepthResponse { #[must_use] pub fn new() -> DepthResponse { DepthResponse { last_update_id: None, bids: None, asks: None, } } } src/spot/rest_api/models/exchange_filters.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "filterType")] pub enum ExchangeFilters { #[serde(rename = "EXCHANGE_MAX_NUM_ORDERS")] ExchangeMaxNumOrders(Box), #[serde(rename = "EXCHANGE_MAX_NUM_ALGO_ORDERS")] ExchangeMaxNumAlgoOrders(Box), #[serde(rename = "EXCHANGE_MAX_NUM_ICEBERG_ORDERS")] ExchangeMaxNumIcebergOrders(Box), #[serde(rename = "EXCHANGE_MAX_NUM_ORDER_LISTS")] ExchangeMaxNumOrderLists(Box), } impl Default for ExchangeFilters { fn default() -> Self { Self::ExchangeMaxNumOrders(Default::default()) } } src/spot/rest_api/models/exchange_info_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInfoResponse { #[serde(rename = "timezone", skip_serializing_if = "Option::is_none")] pub timezone: Option, #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, #[serde(rename = "exchangeFilters", skip_serializing_if = "Option::is_none")] pub exchange_filters: Option>, #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")] pub symbols: Option>, } impl ExchangeInfoResponse { #[must_use] pub fn new() -> ExchangeInfoResponse { ExchangeInfoResponse { timezone: None, server_time: None, rate_limits: None, exchange_filters: None, symbols: None, } } } src/spot/rest_api/models/exchange_max_num_algo_orders_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumAlgoOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumAlgoOrders", skip_serializing_if = "Option::is_none")] pub max_num_algo_orders: Option, } impl ExchangeMaxNumAlgoOrdersFilter { #[must_use] pub fn new() -> ExchangeMaxNumAlgoOrdersFilter { ExchangeMaxNumAlgoOrdersFilter { filter_type: None, max_num_algo_orders: None, } } } src/spot/rest_api/models/exchange_max_num_iceberg_orders_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumIcebergOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde( rename = "maxNumIcebergOrders", skip_serializing_if = "Option::is_none" )] pub max_num_iceberg_orders: Option, } impl ExchangeMaxNumIcebergOrdersFilter { #[must_use] pub fn new() -> ExchangeMaxNumIcebergOrdersFilter { ExchangeMaxNumIcebergOrdersFilter { filter_type: None, max_num_iceberg_orders: None, } } } src/spot/rest_api/models/exchange_max_num_order_lists_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumOrderListsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrderLists", skip_serializing_if = "Option::is_none")] pub max_num_order_lists: Option, } impl ExchangeMaxNumOrderListsFilter { #[must_use] pub fn new() -> ExchangeMaxNumOrderListsFilter { ExchangeMaxNumOrderListsFilter { filter_type: None, max_num_order_lists: None, } } } src/spot/rest_api/models/exchange_max_num_orders_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrders", skip_serializing_if = "Option::is_none")] pub max_num_orders: Option, } impl ExchangeMaxNumOrdersFilter { #[must_use] pub fn new() -> ExchangeMaxNumOrdersFilter { ExchangeMaxNumOrdersFilter { filter_type: None, max_num_orders: None, } } } src/spot/rest_api/models/get_account_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAccountResponse { #[serde(rename = "makerCommission", skip_serializing_if = "Option::is_none")] pub maker_commission: Option, #[serde(rename = "takerCommission", skip_serializing_if = "Option::is_none")] pub taker_commission: Option, #[serde(rename = "buyerCommission", skip_serializing_if = "Option::is_none")] pub buyer_commission: Option, #[serde(rename = "sellerCommission", skip_serializing_if = "Option::is_none")] pub seller_commission: Option, #[serde(rename = "commissionRates", skip_serializing_if = "Option::is_none")] pub commission_rates: Option>, #[serde(rename = "canTrade", skip_serializing_if = "Option::is_none")] pub can_trade: Option, #[serde(rename = "canWithdraw", skip_serializing_if = "Option::is_none")] pub can_withdraw: Option, #[serde(rename = "canDeposit", skip_serializing_if = "Option::is_none")] pub can_deposit: Option, #[serde(rename = "brokered", skip_serializing_if = "Option::is_none")] pub brokered: Option, #[serde( rename = "requireSelfTradePrevention", skip_serializing_if = "Option::is_none" )] pub require_self_trade_prevention: Option, #[serde(rename = "preventSor", skip_serializing_if = "Option::is_none")] pub prevent_sor: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "accountType", skip_serializing_if = "Option::is_none")] pub account_type: Option, #[serde(rename = "balances", skip_serializing_if = "Option::is_none")] pub balances: Option>, #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")] pub permissions: Option>, #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] pub uid: Option, } impl GetAccountResponse { #[must_use] pub fn new() -> GetAccountResponse { GetAccountResponse { maker_commission: None, taker_commission: None, buyer_commission: None, seller_commission: None, commission_rates: None, can_trade: None, can_withdraw: None, can_deposit: None, brokered: None, require_self_trade_prevention: None, prevent_sor: None, update_time: None, account_type: None, balances: None, permissions: None, uid: None, } } } src/spot/rest_api/models/get_account_response_balances_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAccountResponseBalancesInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, } impl GetAccountResponseBalancesInner { #[must_use] pub fn new() -> GetAccountResponseBalancesInner { GetAccountResponseBalancesInner { asset: None, free: None, locked: None, } } } src/spot/rest_api/models/get_account_response_commission_rates.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAccountResponseCommissionRates { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "seller", skip_serializing_if = "Option::is_none")] pub seller: Option, } impl GetAccountResponseCommissionRates { #[must_use] pub fn new() -> GetAccountResponseCommissionRates { GetAccountResponseCommissionRates { maker: None, taker: None, buyer: None, seller: None, } } } src/spot/rest_api/models/get_order_list_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderListResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl GetOrderListResponse { #[must_use] pub fn new() -> GetOrderListResponse { GetOrderListResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, } } } src/spot/rest_api/models/get_order_list_response_orders_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderListResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl GetOrderListResponseOrdersInner { #[must_use] pub fn new() -> GetOrderListResponseOrdersInner { GetOrderListResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/rest_api/models/get_order_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOrderResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "isWorking", skip_serializing_if = "Option::is_none")] pub is_working: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl GetOrderResponse { #[must_use] pub fn new() -> GetOrderResponse { GetOrderResponse { symbol: None, order_id: None, order_list_id: None, client_order_id: None, price: None, orig_qty: None, executed_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, iceberg_qty: None, time: None, update_time: None, is_working: None, working_time: None, orig_quote_order_qty: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/historical_trades_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct HistoricalTradesResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyerMaker", skip_serializing_if = "Option::is_none")] pub is_buyer_maker: Option, #[serde(rename = "isBestMatch", skip_serializing_if = "Option::is_none")] pub is_best_match: Option, } impl HistoricalTradesResponseInner { #[must_use] pub fn new() -> HistoricalTradesResponseInner { HistoricalTradesResponseInner { id: None, price: None, qty: None, quote_qty: None, time: None, is_buyer_maker: None, is_best_match: None, } } } src/spot/rest_api/models/iceberg_parts_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IcebergPartsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, } impl IcebergPartsFilter { #[must_use] pub fn new() -> IcebergPartsFilter { IcebergPartsFilter { filter_type: None, limit: None, } } } src/spot/rest_api/models/klines_item_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum KlinesItemInner { String(String), Integer(i64), Other(serde_json::Value), } impl Default for KlinesItemInner { fn default() -> Self { Self::String(Default::default()) } } src/spot/rest_api/models/lot_size_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct LotSizeFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "minQty", skip_serializing_if = "Option::is_none")] pub min_qty: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "stepSize", skip_serializing_if = "Option::is_none")] pub step_size: Option, } impl LotSizeFilter { #[must_use] pub fn new() -> LotSizeFilter { LotSizeFilter { filter_type: None, qty_exponent: None, min_qty: None, max_qty: None, step_size: None, } } } src/spot/rest_api/models/market_lot_size_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarketLotSizeFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "minQty", skip_serializing_if = "Option::is_none")] pub min_qty: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "stepSize", skip_serializing_if = "Option::is_none")] pub step_size: Option, } impl MarketLotSizeFilter { #[must_use] pub fn new() -> MarketLotSizeFilter { MarketLotSizeFilter { filter_type: None, qty_exponent: None, min_qty: None, max_qty: None, step_size: None, } } } src/spot/rest_api/models/max_asset_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxAssetFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, } impl MaxAssetFilter { #[must_use] pub fn new() -> MaxAssetFilter { MaxAssetFilter { filter_type: None, qty_exponent: None, limit: None, asset: None, } } } src/spot/rest_api/models/max_num_algo_orders_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumAlgoOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumAlgoOrders", skip_serializing_if = "Option::is_none")] pub max_num_algo_orders: Option, } impl MaxNumAlgoOrdersFilter { #[must_use] pub fn new() -> MaxNumAlgoOrdersFilter { MaxNumAlgoOrdersFilter { filter_type: None, max_num_algo_orders: None, } } } src/spot/rest_api/models/max_num_iceberg_orders_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumIcebergOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde( rename = "maxNumIcebergOrders", skip_serializing_if = "Option::is_none" )] pub max_num_iceberg_orders: Option, } impl MaxNumIcebergOrdersFilter { #[must_use] pub fn new() -> MaxNumIcebergOrdersFilter { MaxNumIcebergOrdersFilter { filter_type: None, max_num_iceberg_orders: None, } } } src/spot/rest_api/models/max_num_order_amends_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumOrderAmendsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrderAmends", skip_serializing_if = "Option::is_none")] pub max_num_order_amends: Option, } impl MaxNumOrderAmendsFilter { #[must_use] pub fn new() -> MaxNumOrderAmendsFilter { MaxNumOrderAmendsFilter { filter_type: None, max_num_order_amends: None, } } } src/spot/rest_api/models/max_num_order_lists_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumOrderListsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrderLists", skip_serializing_if = "Option::is_none")] pub max_num_order_lists: Option, } impl MaxNumOrderListsFilter { #[must_use] pub fn new() -> MaxNumOrderListsFilter { MaxNumOrderListsFilter { filter_type: None, max_num_order_lists: None, } } } src/spot/rest_api/models/max_num_orders_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrders", skip_serializing_if = "Option::is_none")] pub max_num_orders: Option, } impl MaxNumOrdersFilter { #[must_use] pub fn new() -> MaxNumOrdersFilter { MaxNumOrdersFilter { filter_type: None, max_num_orders: None, } } } src/spot/rest_api/models/max_position_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxPositionFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "maxPosition", skip_serializing_if = "Option::is_none")] pub max_position: Option, } impl MaxPositionFilter { #[must_use] pub fn new() -> MaxPositionFilter { MaxPositionFilter { filter_type: None, qty_exponent: None, max_position: None, } } } src/spot/rest_api/models/min_notional_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MinNotionalFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "priceExponent", skip_serializing_if = "Option::is_none")] pub price_exponent: Option, #[serde(rename = "minNotional", skip_serializing_if = "Option::is_none")] pub min_notional: Option, #[serde(rename = "applyToMarket", skip_serializing_if = "Option::is_none")] pub apply_to_market: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl MinNotionalFilter { #[must_use] pub fn new() -> MinNotionalFilter { MinNotionalFilter { filter_type: None, price_exponent: None, min_notional: None, apply_to_market: None, avg_price_mins: None, } } } src/spot/rest_api/models/my_allocations_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyAllocationsResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "allocationId", skip_serializing_if = "Option::is_none")] pub allocation_id: Option, #[serde(rename = "allocationType", skip_serializing_if = "Option::is_none")] pub allocation_type: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyer", skip_serializing_if = "Option::is_none")] pub is_buyer: Option, #[serde(rename = "isMaker", skip_serializing_if = "Option::is_none")] pub is_maker: Option, #[serde(rename = "isAllocator", skip_serializing_if = "Option::is_none")] pub is_allocator: Option, } impl MyAllocationsResponseInner { #[must_use] pub fn new() -> MyAllocationsResponseInner { MyAllocationsResponseInner { symbol: None, allocation_id: None, allocation_type: None, order_id: None, order_list_id: None, price: None, qty: None, quote_qty: None, commission: None, commission_asset: None, time: None, is_buyer: None, is_maker: None, is_allocator: None, } } } src/spot/rest_api/models/my_filters_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyFiltersResponse { #[serde(rename = "exchangeFilters", skip_serializing_if = "Option::is_none")] pub exchange_filters: Option>, #[serde(rename = "symbolFilters", skip_serializing_if = "Option::is_none")] pub symbol_filters: Option>, #[serde(rename = "assetFilters", skip_serializing_if = "Option::is_none")] pub asset_filters: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl MyFiltersResponse { #[must_use] pub fn new() -> MyFiltersResponse { MyFiltersResponse { exchange_filters: None, symbol_filters: None, asset_filters: None, rate_limits: None, } } } src/spot/rest_api/models/my_prevented_matches_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyPreventedMatchesResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "preventedMatchId", skip_serializing_if = "Option::is_none")] pub prevented_match_id: Option, #[serde(rename = "takerOrderId", skip_serializing_if = "Option::is_none")] pub taker_order_id: Option, #[serde(rename = "makerSymbol", skip_serializing_if = "Option::is_none")] pub maker_symbol: Option, #[serde(rename = "makerOrderId", skip_serializing_if = "Option::is_none")] pub maker_order_id: Option, #[serde(rename = "tradeGroupId", skip_serializing_if = "Option::is_none")] pub trade_group_id: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde( rename = "makerPreventedQuantity", skip_serializing_if = "Option::is_none" )] pub maker_prevented_quantity: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, } impl MyPreventedMatchesResponseInner { #[must_use] pub fn new() -> MyPreventedMatchesResponseInner { MyPreventedMatchesResponseInner { symbol: None, prevented_match_id: None, taker_order_id: None, maker_symbol: None, maker_order_id: None, trade_group_id: None, self_trade_prevention_mode: None, price: None, maker_prevented_quantity: None, transact_time: None, } } } src/spot/rest_api/models/my_trades_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyTradesResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyer", skip_serializing_if = "Option::is_none")] pub is_buyer: Option, #[serde(rename = "isMaker", skip_serializing_if = "Option::is_none")] pub is_maker: Option, #[serde(rename = "isBestMatch", skip_serializing_if = "Option::is_none")] pub is_best_match: Option, } impl MyTradesResponseInner { #[must_use] pub fn new() -> MyTradesResponseInner { MyTradesResponseInner { symbol: None, id: None, order_id: None, order_list_id: None, price: None, qty: None, quote_qty: None, commission: None, commission_asset: None, time: None, is_buyer: None, is_maker: None, is_best_match: None, } } } src/spot/rest_api/models/new_order_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewOrderResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "fills", skip_serializing_if = "Option::is_none")] pub fills: Option>, } impl NewOrderResponse { #[must_use] pub fn new() -> NewOrderResponse { NewOrderResponse { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, self_trade_prevention_mode: None, fills: None, } } } src/spot/rest_api/models/new_order_response_fills_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NewOrderResponseFillsInner { #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, } impl NewOrderResponseFillsInner { #[must_use] pub fn new() -> NewOrderResponseFillsInner { NewOrderResponseFillsInner { price: None, qty: None, commission: None, commission_asset: None, trade_id: None, } } } src/spot/rest_api/models/notional_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NotionalFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "priceExponent", skip_serializing_if = "Option::is_none")] pub price_exponent: Option, #[serde(rename = "minNotional", skip_serializing_if = "Option::is_none")] pub min_notional: Option, #[serde(rename = "applyMinToMarket", skip_serializing_if = "Option::is_none")] pub apply_min_to_market: Option, #[serde(rename = "maxNotional", skip_serializing_if = "Option::is_none")] pub max_notional: Option, #[serde(rename = "applyMaxToMarket", skip_serializing_if = "Option::is_none")] pub apply_max_to_market: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl NotionalFilter { #[must_use] pub fn new() -> NotionalFilter { NotionalFilter { filter_type: None, price_exponent: None, min_notional: None, apply_min_to_market: None, max_notional: None, apply_max_to_market: None, avg_price_mins: None, } } } src/spot/rest_api/models/open_order_list_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenOrderListResponseInner { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl OpenOrderListResponseInner { #[must_use] pub fn new() -> OpenOrderListResponseInner { OpenOrderListResponseInner { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, } } } src/spot/rest_api/models/open_order_list_response_inner_orders_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenOrderListResponseInnerOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OpenOrderListResponseInnerOrdersInner { #[must_use] pub fn new() -> OpenOrderListResponseInnerOrdersInner { OpenOrderListResponseInnerOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/rest_api/models/order_amend_keep_priority_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendKeepPriorityResponse { #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "executionId", skip_serializing_if = "Option::is_none")] pub execution_id: Option, #[serde(rename = "amendedOrder", skip_serializing_if = "Option::is_none")] pub amended_order: Option>, #[serde(rename = "listStatus", skip_serializing_if = "Option::is_none")] pub list_status: Option>, } impl OrderAmendKeepPriorityResponse { #[must_use] pub fn new() -> OrderAmendKeepPriorityResponse { OrderAmendKeepPriorityResponse { transact_time: None, execution_id: None, amended_order: None, list_status: None, } } } src/spot/rest_api/models/order_amend_keep_priority_response_amended_order.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendKeepPriorityResponseAmendedOrder { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "preventedQty", skip_serializing_if = "Option::is_none")] pub prevented_qty: Option, #[serde(rename = "quoteOrderQty", skip_serializing_if = "Option::is_none")] pub quote_order_qty: Option, #[serde(rename = "cumulativeQuoteQty", skip_serializing_if = "Option::is_none")] pub cumulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderAmendKeepPriorityResponseAmendedOrder { #[must_use] pub fn new() -> OrderAmendKeepPriorityResponseAmendedOrder { OrderAmendKeepPriorityResponseAmendedOrder { symbol: None, order_id: None, order_list_id: None, orig_client_order_id: None, client_order_id: None, price: None, qty: None, executed_qty: None, prevented_qty: None, quote_order_qty: None, cumulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/order_amend_keep_priority_response_list_status.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendKeepPriorityResponseListStatus { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl OrderAmendKeepPriorityResponseListStatus { #[must_use] pub fn new() -> OrderAmendKeepPriorityResponseListStatus { OrderAmendKeepPriorityResponseListStatus { order_list_id: None, contingency_type: None, list_order_status: None, list_client_order_id: None, symbol: None, orders: None, } } } src/spot/rest_api/models/order_amend_keep_priority_response_list_status_orders_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendKeepPriorityResponseListStatusOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OrderAmendKeepPriorityResponseListStatusOrdersInner { #[must_use] pub fn new() -> OrderAmendKeepPriorityResponseListStatusOrdersInner { OrderAmendKeepPriorityResponseListStatusOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/rest_api/models/order_amendments_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendmentsResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "executionId", skip_serializing_if = "Option::is_none")] pub execution_id: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "newClientOrderId", skip_serializing_if = "Option::is_none")] pub new_client_order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "newQty", skip_serializing_if = "Option::is_none")] pub new_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl OrderAmendmentsResponseInner { #[must_use] pub fn new() -> OrderAmendmentsResponseInner { OrderAmendmentsResponseInner { symbol: None, order_id: None, execution_id: None, orig_client_order_id: None, new_client_order_id: None, orig_qty: None, new_qty: None, time: None, } } } src/spot/rest_api/models/order_cancel_replace_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelReplaceResponse { #[serde(rename = "cancelResult", skip_serializing_if = "Option::is_none")] pub cancel_result: Option, #[serde(rename = "newOrderResult", skip_serializing_if = "Option::is_none")] pub new_order_result: Option, #[serde(rename = "cancelResponse", skip_serializing_if = "Option::is_none")] pub cancel_response: Option>, #[serde(rename = "newOrderResponse", skip_serializing_if = "Option::is_none")] pub new_order_response: Option>, #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl OrderCancelReplaceResponse { #[must_use] pub fn new() -> OrderCancelReplaceResponse { OrderCancelReplaceResponse { cancel_result: None, new_order_result: None, cancel_response: None, new_order_response: None, code: None, msg: None, data: None, } } } src/spot/rest_api/models/order_cancel_replace_response_cancel_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelReplaceResponseCancelResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderCancelReplaceResponseCancelResponse { #[must_use] pub fn new() -> OrderCancelReplaceResponseCancelResponse { OrderCancelReplaceResponseCancelResponse { symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/order_cancel_replace_response_data.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelReplaceResponseData { #[serde(rename = "cancelResult", skip_serializing_if = "Option::is_none")] pub cancel_result: Option, #[serde(rename = "newOrderResult", skip_serializing_if = "Option::is_none")] pub new_order_result: Option, #[serde(rename = "cancelResponse", skip_serializing_if = "Option::is_none")] pub cancel_response: Option>, #[serde(rename = "newOrderResponse", skip_serializing_if = "Option::is_none")] pub new_order_response: Option>, } impl OrderCancelReplaceResponseData { #[must_use] pub fn new() -> OrderCancelReplaceResponseData { OrderCancelReplaceResponseData { cancel_result: None, new_order_result: None, cancel_response: None, new_order_response: None, } } } src/spot/rest_api/models/order_cancel_replace_response_data_cancel_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelReplaceResponseDataCancelResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderCancelReplaceResponseDataCancelResponse { #[must_use] pub fn new() -> OrderCancelReplaceResponseDataCancelResponse { OrderCancelReplaceResponseDataCancelResponse { code: None, msg: None, symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/order_cancel_replace_response_data_new_order_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelReplaceResponseDataNewOrderResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, } impl OrderCancelReplaceResponseDataNewOrderResponse { #[must_use] pub fn new() -> OrderCancelReplaceResponseDataNewOrderResponse { OrderCancelReplaceResponseDataNewOrderResponse { code: None, msg: None, symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, } } } src/spot/rest_api/models/order_cancel_replace_response_new_order_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelReplaceResponseNewOrderResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde(rename = "fills", skip_serializing_if = "Option::is_none")] pub fills: Option>, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderCancelReplaceResponseNewOrderResponse { #[must_use] pub fn new() -> OrderCancelReplaceResponseNewOrderResponse { OrderCancelReplaceResponseNewOrderResponse { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, fills: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/order_list_oco_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListOcoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl OrderListOcoResponse { #[must_use] pub fn new() -> OrderListOcoResponse { OrderListOcoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/spot/rest_api/models/order_list_oco_response_order_reports_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListOcoResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde(rename = "icebergQty", skip_serializing_if = "Option::is_none")] pub iceberg_qty: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderListOcoResponseOrderReportsInner { #[must_use] pub fn new() -> OrderListOcoResponseOrderReportsInner { OrderListOcoResponseOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, working_time: None, iceberg_qty: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/order_list_oco_response_orders_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListOcoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OrderListOcoResponseOrdersInner { #[must_use] pub fn new() -> OrderListOcoResponseOrdersInner { OrderListOcoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/rest_api/models/order_list_oto_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListOtoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl OrderListOtoResponse { #[must_use] pub fn new() -> OrderListOtoResponse { OrderListOtoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/spot/rest_api/models/order_list_oto_response_order_reports_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListOtoResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderListOtoResponseOrderReportsInner { #[must_use] pub fn new() -> OrderListOtoResponseOrderReportsInner { OrderListOtoResponseOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/order_list_oto_response_orders_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListOtoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OrderListOtoResponseOrdersInner { #[must_use] pub fn new() -> OrderListOtoResponseOrdersInner { OrderListOtoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/rest_api/models/order_list_otoco_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListOtocoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl OrderListOtocoResponse { #[must_use] pub fn new() -> OrderListOtocoResponse { OrderListOtocoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/spot/rest_api/models/order_list_otoco_response_order_reports_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListOtocoResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, } impl OrderListOtocoResponseOrderReportsInner { #[must_use] pub fn new() -> OrderListOtocoResponseOrderReportsInner { OrderListOtocoResponseOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, self_trade_prevention_mode: None, stop_price: None, } } } src/spot/rest_api/models/order_list_otoco_response_orders_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListOtocoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OrderListOtocoResponseOrdersInner { #[must_use] pub fn new() -> OrderListOtocoResponseOrdersInner { OrderListOtocoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/rest_api/models/order_oco_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderOcoResponse { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl OrderOcoResponse { #[must_use] pub fn new() -> OrderOcoResponse { OrderOcoResponse { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/spot/rest_api/models/order_oco_response_order_reports_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderOcoResponseOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderOcoResponseOrderReportsInner { #[must_use] pub fn new() -> OrderOcoResponseOrderReportsInner { OrderOcoResponseOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, working_time: None, self_trade_prevention_mode: None, } } } src/spot/rest_api/models/order_oco_response_orders_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderOcoResponseOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OrderOcoResponseOrdersInner { #[must_use] pub fn new() -> OrderOcoResponseOrdersInner { OrderOcoResponseOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/rest_api/models/order_test_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTestResponse { #[serde( rename = "standardCommissionForOrder", skip_serializing_if = "Option::is_none" )] pub standard_commission_for_order: Option>, #[serde( rename = "specialCommissionForOrder", skip_serializing_if = "Option::is_none" )] pub special_commission_for_order: Option>, #[serde( rename = "taxCommissionForOrder", skip_serializing_if = "Option::is_none" )] pub tax_commission_for_order: Option>, #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] pub discount: Option>, } impl OrderTestResponse { #[must_use] pub fn new() -> OrderTestResponse { OrderTestResponse { standard_commission_for_order: None, special_commission_for_order: None, tax_commission_for_order: None, discount: None, } } } src/spot/rest_api/models/order_test_response_discount.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTestResponseDiscount { #[serde(rename = "enabledForAccount", skip_serializing_if = "Option::is_none")] pub enabled_for_account: Option, #[serde(rename = "enabledForSymbol", skip_serializing_if = "Option::is_none")] pub enabled_for_symbol: Option, #[serde(rename = "discountAsset", skip_serializing_if = "Option::is_none")] pub discount_asset: Option, #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] pub discount: Option, } impl OrderTestResponseDiscount { #[must_use] pub fn new() -> OrderTestResponseDiscount { OrderTestResponseDiscount { enabled_for_account: None, enabled_for_symbol: None, discount_asset: None, discount: None, } } } src/spot/rest_api/models/order_test_response_special_commission_for_order.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTestResponseSpecialCommissionForOrder { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, } impl OrderTestResponseSpecialCommissionForOrder { #[must_use] pub fn new() -> OrderTestResponseSpecialCommissionForOrder { OrderTestResponseSpecialCommissionForOrder { maker: None, taker: None, } } } src/spot/rest_api/models/order_test_response_standard_commission_for_order.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTestResponseStandardCommissionForOrder { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, } impl OrderTestResponseStandardCommissionForOrder { #[must_use] pub fn new() -> OrderTestResponseStandardCommissionForOrder { OrderTestResponseStandardCommissionForOrder { maker: None, taker: None, } } } src/spot/rest_api/models/percent_price_by_side_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PercentPriceBySideFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "multiplierExponent", skip_serializing_if = "Option::is_none")] pub multiplier_exponent: Option, #[serde(rename = "bidMultiplierUp", skip_serializing_if = "Option::is_none")] pub bid_multiplier_up: Option, #[serde(rename = "bidMultiplierDown", skip_serializing_if = "Option::is_none")] pub bid_multiplier_down: Option, #[serde(rename = "askMultiplierUp", skip_serializing_if = "Option::is_none")] pub ask_multiplier_up: Option, #[serde(rename = "askMultiplierDown", skip_serializing_if = "Option::is_none")] pub ask_multiplier_down: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl PercentPriceBySideFilter { #[must_use] pub fn new() -> PercentPriceBySideFilter { PercentPriceBySideFilter { filter_type: None, multiplier_exponent: None, bid_multiplier_up: None, bid_multiplier_down: None, ask_multiplier_up: None, ask_multiplier_down: None, avg_price_mins: None, } } } src/spot/rest_api/models/percent_price_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PercentPriceFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "multiplierExponent", skip_serializing_if = "Option::is_none")] pub multiplier_exponent: Option, #[serde(rename = "multiplierUp", skip_serializing_if = "Option::is_none")] pub multiplier_up: Option, #[serde(rename = "multiplierDown", skip_serializing_if = "Option::is_none")] pub multiplier_down: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl PercentPriceFilter { #[must_use] pub fn new() -> PercentPriceFilter { PercentPriceFilter { filter_type: None, multiplier_exponent: None, multiplier_up: None, multiplier_down: None, avg_price_mins: None, } } } src/spot/rest_api/models/price_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PriceFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "priceExponent", skip_serializing_if = "Option::is_none")] pub price_exponent: Option, #[serde(rename = "minPrice", skip_serializing_if = "Option::is_none")] pub min_price: Option, #[serde(rename = "maxPrice", skip_serializing_if = "Option::is_none")] pub max_price: Option, #[serde(rename = "tickSize", skip_serializing_if = "Option::is_none")] pub tick_size: Option, } impl PriceFilter { #[must_use] pub fn new() -> PriceFilter { PriceFilter { filter_type: None, price_exponent: None, min_price: None, max_price: None, tick_size: None, } } } src/spot/rest_api/models/rate_limit_order_response_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RateLimitOrderResponseInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl RateLimitOrderResponseInner { #[must_use] pub fn new() -> RateLimitOrderResponseInner { RateLimitOrderResponseInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/spot/rest_api/models/rate_limits.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RateLimits { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl RateLimits { #[must_use] pub fn new() -> RateLimits { RateLimits { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/spot/rest_api/models/sor_order_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SorOrderResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde(rename = "fills", skip_serializing_if = "Option::is_none")] pub fills: Option>, #[serde(rename = "workingFloor", skip_serializing_if = "Option::is_none")] pub working_floor: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "usedSor", skip_serializing_if = "Option::is_none")] pub used_sor: Option, } impl SorOrderResponse { #[must_use] pub fn new() -> SorOrderResponse { SorOrderResponse { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, fills: None, working_floor: None, self_trade_prevention_mode: None, used_sor: None, } } } src/spot/rest_api/models/sor_order_response_fills_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SorOrderResponseFillsInner { #[serde(rename = "matchType", skip_serializing_if = "Option::is_none")] pub match_type: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, #[serde(rename = "allocId", skip_serializing_if = "Option::is_none")] pub alloc_id: Option, } impl SorOrderResponseFillsInner { #[must_use] pub fn new() -> SorOrderResponseFillsInner { SorOrderResponseFillsInner { match_type: None, price: None, qty: None, commission: None, commission_asset: None, trade_id: None, alloc_id: None, } } } src/spot/rest_api/models/sor_order_test_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SorOrderTestResponse { #[serde( rename = "standardCommissionForOrder", skip_serializing_if = "Option::is_none" )] pub standard_commission_for_order: Option>, #[serde( rename = "taxCommissionForOrder", skip_serializing_if = "Option::is_none" )] pub tax_commission_for_order: Option>, #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] pub discount: Option>, } impl SorOrderTestResponse { #[must_use] pub fn new() -> SorOrderTestResponse { SorOrderTestResponse { standard_commission_for_order: None, tax_commission_for_order: None, discount: None, } } } src/spot/rest_api/models/symbol_filters.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "filterType")] pub enum SymbolFilters { #[serde(rename = "PRICE_FILTER")] PriceFilter(Box), #[serde(rename = "PERCENT_PRICE")] PercentPrice(Box), #[serde(rename = "PERCENT_PRICE_BY_SIDE")] PercentPriceBySide(Box), #[serde(rename = "LOT_SIZE")] LotSize(Box), #[serde(rename = "MIN_NOTIONAL")] MinNotional(Box), #[serde(rename = "NOTIONAL")] Notional(Box), #[serde(rename = "ICEBERG_PARTS")] IcebergParts(Box), #[serde(rename = "MARKET_LOT_SIZE")] MarketLotSize(Box), #[serde(rename = "MAX_NUM_ORDERS")] MaxNumOrders(Box), #[serde(rename = "MAX_NUM_ALGO_ORDERS")] MaxNumAlgoOrders(Box), #[serde(rename = "MAX_NUM_ICEBERG_ORDERS")] MaxNumIcebergOrders(Box), #[serde(rename = "MAX_POSITION")] MaxPosition(Box), #[serde(rename = "TRAILING_DELTA")] TrailingDelta(Box), #[serde(rename = "T_PLUS_SELL")] TPlusSell(Box), #[serde(rename = "MAX_NUM_ORDER_LISTS")] MaxNumOrderLists(Box), #[serde(rename = "MAX_NUM_ORDER_AMENDS")] MaxNumOrderAmends(Box), } impl Default for SymbolFilters { fn default() -> Self { Self::PriceFilter(Default::default()) } } src/spot/rest_api/models/t_plus_sell_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TPlusSellFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")] pub end_time: Option, } impl TPlusSellFilter { #[must_use] pub fn new() -> TPlusSellFilter { TPlusSellFilter { filter_type: None, end_time: None, } } } src/spot/rest_api/models/ticker24hr_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum Ticker24hrResponse { Ticker24hrResponse1(Box), Ticker24hrResponse2(Vec), Other(serde_json::Value), } impl Default for Ticker24hrResponse { fn default() -> Self { Self::Ticker24hrResponse1(Default::default()) } } src/spot/rest_api/models/ticker24hr_response1.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Ticker24hrResponse1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "prevClosePrice", skip_serializing_if = "Option::is_none")] pub prev_close_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "lastQty", skip_serializing_if = "Option::is_none")] pub last_qty: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "bidQty", skip_serializing_if = "Option::is_none")] pub bid_qty: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "askQty", skip_serializing_if = "Option::is_none")] pub ask_qty: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl Ticker24hrResponse1 { #[must_use] pub fn new() -> Ticker24hrResponse1 { Ticker24hrResponse1 { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, prev_close_price: None, last_price: None, last_qty: None, bid_price: None, bid_qty: None, ask_price: None, ask_qty: None, open_price: None, high_price: None, low_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/spot/rest_api/models/ticker24hr_response2_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Ticker24hrResponse2Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "prevClosePrice", skip_serializing_if = "Option::is_none")] pub prev_close_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "lastQty", skip_serializing_if = "Option::is_none")] pub last_qty: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "bidQty", skip_serializing_if = "Option::is_none")] pub bid_qty: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "askQty", skip_serializing_if = "Option::is_none")] pub ask_qty: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl Ticker24hrResponse2Inner { #[must_use] pub fn new() -> Ticker24hrResponse2Inner { Ticker24hrResponse2Inner { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, prev_close_price: None, last_price: None, last_qty: None, bid_price: None, bid_qty: None, ask_price: None, ask_qty: None, open_price: None, high_price: None, low_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/spot/rest_api/models/ticker_book_ticker_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TickerBookTickerResponse { TickerBookTickerResponse1(Box), TickerBookTickerResponse2(Vec), Other(serde_json::Value), } impl Default for TickerBookTickerResponse { fn default() -> Self { Self::TickerBookTickerResponse1(Default::default()) } } src/spot/rest_api/models/ticker_book_ticker_response1.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerBookTickerResponse1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "bidQty", skip_serializing_if = "Option::is_none")] pub bid_qty: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "askQty", skip_serializing_if = "Option::is_none")] pub ask_qty: Option, } impl TickerBookTickerResponse1 { #[must_use] pub fn new() -> TickerBookTickerResponse1 { TickerBookTickerResponse1 { symbol: None, bid_price: None, bid_qty: None, ask_price: None, ask_qty: None, } } } src/spot/rest_api/models/ticker_book_ticker_response2_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerBookTickerResponse2Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "bidQty", skip_serializing_if = "Option::is_none")] pub bid_qty: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "askQty", skip_serializing_if = "Option::is_none")] pub ask_qty: Option, } impl TickerBookTickerResponse2Inner { #[must_use] pub fn new() -> TickerBookTickerResponse2Inner { TickerBookTickerResponse2Inner { symbol: None, bid_price: None, bid_qty: None, ask_price: None, ask_qty: None, } } } src/spot/rest_api/models/ticker_price_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TickerPriceResponse { TickerPriceResponse1(Box), TickerPriceResponse2(Vec), Other(serde_json::Value), } impl Default for TickerPriceResponse { fn default() -> Self { Self::TickerPriceResponse1(Default::default()) } } src/spot/rest_api/models/ticker_price_response1.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerPriceResponse1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, } impl TickerPriceResponse1 { #[must_use] pub fn new() -> TickerPriceResponse1 { TickerPriceResponse1 { symbol: None, price: None, } } } src/spot/rest_api/models/ticker_price_response2_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerPriceResponse2Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, } impl TickerPriceResponse2Inner { #[must_use] pub fn new() -> TickerPriceResponse2Inner { TickerPriceResponse2Inner { symbol: None, price: None, } } } src/spot/rest_api/models/ticker_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TickerResponse { TickerResponse1(Box), TickerResponse2(Vec), Other(serde_json::Value), } impl Default for TickerResponse { fn default() -> Self { Self::TickerResponse1(Default::default()) } } src/spot/rest_api/models/ticker_response1.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerResponse1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl TickerResponse1 { #[must_use] pub fn new() -> TickerResponse1 { TickerResponse1 { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, open_price: None, high_price: None, low_price: None, last_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/spot/rest_api/models/ticker_response2_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerResponse2Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl TickerResponse2Inner { #[must_use] pub fn new() -> TickerResponse2Inner { TickerResponse2Inner { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, open_price: None, high_price: None, low_price: None, last_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/spot/rest_api/models/ticker_trading_day_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TickerTradingDayResponse { TickerTradingDayResponse1(Box), TickerTradingDayResponse2(Vec), Other(serde_json::Value), } impl Default for TickerTradingDayResponse { fn default() -> Self { Self::TickerTradingDayResponse1(Default::default()) } } src/spot/rest_api/models/ticker_trading_day_response1.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerTradingDayResponse1 { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl TickerTradingDayResponse1 { #[must_use] pub fn new() -> TickerTradingDayResponse1 { TickerTradingDayResponse1 { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, open_price: None, high_price: None, low_price: None, last_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/spot/rest_api/models/ticker_trading_day_response2_inner.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerTradingDayResponse2Inner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl TickerTradingDayResponse2Inner { #[must_use] pub fn new() -> TickerTradingDayResponse2Inner { TickerTradingDayResponse2Inner { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, open_price: None, high_price: None, low_price: None, last_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/spot/rest_api/models/time_response.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TimeResponse { #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, } impl TimeResponse { #[must_use] pub fn new() -> TimeResponse { TimeResponse { server_time: None } } } src/spot/rest_api/models/trailing_delta_filter.rs /* * Binance Spot REST API * * OpenAPI Specifications for the Binance Spot REST API * * API documents: * - [Github rest-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) * - [General API information for rest-api on website](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TrailingDeltaFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde( rename = "minTrailingAboveDelta", skip_serializing_if = "Option::is_none" )] pub min_trailing_above_delta: Option, #[serde( rename = "maxTrailingAboveDelta", skip_serializing_if = "Option::is_none" )] pub max_trailing_above_delta: Option, #[serde( rename = "minTrailingBelowDelta", skip_serializing_if = "Option::is_none" )] pub min_trailing_below_delta: Option, #[serde( rename = "maxTrailingBelowDelta", skip_serializing_if = "Option::is_none" )] pub max_trailing_below_delta: Option, } impl TrailingDeltaFilter { #[must_use] pub fn new() -> TrailingDeltaFilter { TrailingDeltaFilter { filter_type: None, min_trailing_above_delta: None, max_trailing_above_delta: None, min_trailing_below_delta: None, max_trailing_below_delta: None, } } } src/spot/websocket_api/apis/mod.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod auth_api; pub use auth_api::*; pub mod general_api; pub use general_api::*; pub mod market_api; pub use market_api::*; pub mod trade_api; pub use trade_api::*; pub mod user_data_stream_api; pub use user_data_stream_api::*; src/spot/websocket_api/handle.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ use crate::{common::config::ConfigurationWebsocketApi, models::WebsocketApiConnectConfig}; use super::WebsocketApi; #[derive(Clone)] pub struct WebsocketApiHandle { configuration: ConfigurationWebsocketApi, } impl WebsocketApiHandle { pub fn new(configuration: ConfigurationWebsocketApi) -> Self { Self { configuration } } /// Connects to the WebSocket API using default configuration. /// /// # Returns /// /// A `Result` containing the connected `WebsocketApi` instance if successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// pub async fn connect(&self) -> anyhow::Result { self.connect_with_config(Default::default()).await } /// Connects to the WebSocket API with a custom configuration. /// /// # Arguments /// /// * `cfg` - A configuration object specifying connection parameters. /// /// # Returns /// /// A `Result` containing the connected `WebsocketApi` instance if successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// pub async fn connect_with_config( &self, cfg: WebsocketApiConnectConfig, ) -> anyhow::Result { WebsocketApi::connect(self.configuration.clone(), cfg.mode).await } } src/spot/websocket_api/models/account_commission_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl AccountCommissionResponse { #[must_use] pub fn new() -> AccountCommissionResponse { AccountCommissionResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/account_commission_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponseResult { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "standardCommission", skip_serializing_if = "Option::is_none")] pub standard_commission: Option>, #[serde(rename = "specialCommission", skip_serializing_if = "Option::is_none")] pub special_commission: Option>, #[serde(rename = "taxCommission", skip_serializing_if = "Option::is_none")] pub tax_commission: Option>, #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] pub discount: Option>, } impl AccountCommissionResponseResult { #[must_use] pub fn new() -> AccountCommissionResponseResult { AccountCommissionResponseResult { symbol: None, standard_commission: None, special_commission: None, tax_commission: None, discount: None, } } } src/spot/websocket_api/models/account_commission_response_result_discount.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponseResultDiscount { #[serde(rename = "enabledForAccount", skip_serializing_if = "Option::is_none")] pub enabled_for_account: Option, #[serde(rename = "enabledForSymbol", skip_serializing_if = "Option::is_none")] pub enabled_for_symbol: Option, #[serde(rename = "discountAsset", skip_serializing_if = "Option::is_none")] pub discount_asset: Option, #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] pub discount: Option, } impl AccountCommissionResponseResultDiscount { #[must_use] pub fn new() -> AccountCommissionResponseResultDiscount { AccountCommissionResponseResultDiscount { enabled_for_account: None, enabled_for_symbol: None, discount_asset: None, discount: None, } } } src/spot/websocket_api/models/account_commission_response_result_special_commission.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponseResultSpecialCommission { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "seller", skip_serializing_if = "Option::is_none")] pub seller: Option, } impl AccountCommissionResponseResultSpecialCommission { #[must_use] pub fn new() -> AccountCommissionResponseResultSpecialCommission { AccountCommissionResponseResultSpecialCommission { maker: None, taker: None, buyer: None, seller: None, } } } src/spot/websocket_api/models/account_commission_response_result_standard_commission.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponseResultStandardCommission { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "seller", skip_serializing_if = "Option::is_none")] pub seller: Option, } impl AccountCommissionResponseResultStandardCommission { #[must_use] pub fn new() -> AccountCommissionResponseResultStandardCommission { AccountCommissionResponseResultStandardCommission { maker: None, taker: None, buyer: None, seller: None, } } } src/spot/websocket_api/models/account_commission_response_result_tax_commission.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountCommissionResponseResultTaxCommission { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "seller", skip_serializing_if = "Option::is_none")] pub seller: Option, } impl AccountCommissionResponseResultTaxCommission { #[must_use] pub fn new() -> AccountCommissionResponseResultTaxCommission { AccountCommissionResponseResultTaxCommission { maker: None, taker: None, buyer: None, seller: None, } } } src/spot/websocket_api/models/account_rate_limits_orders_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountRateLimitsOrdersResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl AccountRateLimitsOrdersResponse { #[must_use] pub fn new() -> AccountRateLimitsOrdersResponse { AccountRateLimitsOrdersResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/account_rate_limits_orders_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountRateLimitsOrdersResponseResultInner { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl AccountRateLimitsOrdersResponseResultInner { #[must_use] pub fn new() -> AccountRateLimitsOrdersResponseResultInner { AccountRateLimitsOrdersResponseResultInner { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/spot/websocket_api/models/account_status_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountStatusResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl AccountStatusResponse { #[must_use] pub fn new() -> AccountStatusResponse { AccountStatusResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/account_status_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountStatusResponseResult { #[serde(rename = "makerCommission", skip_serializing_if = "Option::is_none")] pub maker_commission: Option, #[serde(rename = "takerCommission", skip_serializing_if = "Option::is_none")] pub taker_commission: Option, #[serde(rename = "buyerCommission", skip_serializing_if = "Option::is_none")] pub buyer_commission: Option, #[serde(rename = "sellerCommission", skip_serializing_if = "Option::is_none")] pub seller_commission: Option, #[serde(rename = "canTrade", skip_serializing_if = "Option::is_none")] pub can_trade: Option, #[serde(rename = "canWithdraw", skip_serializing_if = "Option::is_none")] pub can_withdraw: Option, #[serde(rename = "canDeposit", skip_serializing_if = "Option::is_none")] pub can_deposit: Option, #[serde(rename = "commissionRates", skip_serializing_if = "Option::is_none")] pub commission_rates: Option>, #[serde(rename = "brokered", skip_serializing_if = "Option::is_none")] pub brokered: Option, #[serde( rename = "requireSelfTradePrevention", skip_serializing_if = "Option::is_none" )] pub require_self_trade_prevention: Option, #[serde(rename = "preventSor", skip_serializing_if = "Option::is_none")] pub prevent_sor: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "accountType", skip_serializing_if = "Option::is_none")] pub account_type: Option, #[serde(rename = "balances", skip_serializing_if = "Option::is_none")] pub balances: Option>, #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")] pub permissions: Option>, #[serde(rename = "uid", skip_serializing_if = "Option::is_none")] pub uid: Option, } impl AccountStatusResponseResult { #[must_use] pub fn new() -> AccountStatusResponseResult { AccountStatusResponseResult { maker_commission: None, taker_commission: None, buyer_commission: None, seller_commission: None, can_trade: None, can_withdraw: None, can_deposit: None, commission_rates: None, brokered: None, require_self_trade_prevention: None, prevent_sor: None, update_time: None, account_type: None, balances: None, permissions: None, uid: None, } } } src/spot/websocket_api/models/account_status_response_result_balances_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountStatusResponseResultBalancesInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, } impl AccountStatusResponseResultBalancesInner { #[must_use] pub fn new() -> AccountStatusResponseResultBalancesInner { AccountStatusResponseResultBalancesInner { asset: None, free: None, locked: None, } } } src/spot/websocket_api/models/account_status_response_result_commission_rates.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountStatusResponseResultCommissionRates { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, #[serde(rename = "buyer", skip_serializing_if = "Option::is_none")] pub buyer: Option, #[serde(rename = "seller", skip_serializing_if = "Option::is_none")] pub seller: Option, } impl AccountStatusResponseResultCommissionRates { #[must_use] pub fn new() -> AccountStatusResponseResultCommissionRates { AccountStatusResponseResultCommissionRates { maker: None, taker: None, buyer: None, seller: None, } } } src/spot/websocket_api/models/all_order_lists_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllOrderListsResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl AllOrderListsResponse { #[must_use] pub fn new() -> AllOrderListsResponse { AllOrderListsResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/all_order_lists_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllOrderListsResponseResultInner { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl AllOrderListsResponseResultInner { #[must_use] pub fn new() -> AllOrderListsResponseResultInner { AllOrderListsResponseResultInner { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, } } } src/spot/websocket_api/models/all_orders_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllOrdersResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl AllOrdersResponse { #[must_use] pub fn new() -> AllOrdersResponse { AllOrdersResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/asset_filters.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(try_from = "Value")] pub enum AssetFilters { #[serde(rename = "MAX_ASSET")] MaxAsset(Box), Other(serde_json::Value), } impl Default for AssetFilters { fn default() -> Self { Self::MaxAsset(Default::default()) } } impl TryFrom for AssetFilters { type Error = serde_json::Error; fn try_from(v: Value) -> Result { let tag = v .get("filterType") .and_then(Value::as_str) .ok_or_else(|| serde_json::Error::custom("missing field `filterType`"))?; match tag { "MAX_ASSET" => { let payload = serde_json::from_value(v)?; Ok(AssetFilters::MaxAsset(Box::new(payload))) } _ => Ok(AssetFilters::Other(v)), } } } src/spot/websocket_api/models/avg_price_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AvgPriceResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl AvgPriceResponse { #[must_use] pub fn new() -> AvgPriceResponse { AvgPriceResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/avg_price_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AvgPriceResponseResult { #[serde(rename = "mins", skip_serializing_if = "Option::is_none")] pub mins: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, } impl AvgPriceResponseResult { #[must_use] pub fn new() -> AvgPriceResponseResult { AvgPriceResponseResult { mins: None, price: None, close_time: None, } } } src/spot/websocket_api/models/balance_update.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct BalanceUpdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "d", skip_serializing_if = "Option::is_none")] pub d: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl BalanceUpdate { #[must_use] pub fn new() -> BalanceUpdate { BalanceUpdate { e_uppercase: None, a: None, d: None, t_uppercase: None, } } } src/spot/websocket_api/models/depth_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepthResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl DepthResponse { #[must_use] pub fn new() -> DepthResponse { DepthResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/depth_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepthResponseResult { #[serde(rename = "lastUpdateId", skip_serializing_if = "Option::is_none")] pub last_update_id: Option, #[serde(rename = "bids", skip_serializing_if = "Option::is_none")] pub bids: Option>>, #[serde(rename = "asks", skip_serializing_if = "Option::is_none")] pub asks: Option>>, } impl DepthResponseResult { #[must_use] pub fn new() -> DepthResponseResult { DepthResponseResult { last_update_id: None, bids: None, asks: None, } } } src/spot/websocket_api/models/event_stream_terminated.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EventStreamTerminated { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, } impl EventStreamTerminated { #[must_use] pub fn new() -> EventStreamTerminated { EventStreamTerminated { e_uppercase: None } } } src/spot/websocket_api/models/exchange_filters.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(try_from = "Value")] pub enum ExchangeFilters { #[serde(rename = "EXCHANGE_MAX_NUM_ORDERS")] ExchangeMaxNumOrders(Box), #[serde(rename = "EXCHANGE_MAX_NUM_ALGO_ORDERS")] ExchangeMaxNumAlgoOrders(Box), #[serde(rename = "EXCHANGE_MAX_NUM_ICEBERG_ORDERS")] ExchangeMaxNumIcebergOrders(Box), #[serde(rename = "EXCHANGE_MAX_NUM_ORDER_LISTS")] ExchangeMaxNumOrderLists(Box), Other(serde_json::Value), } impl Default for ExchangeFilters { fn default() -> Self { Self::ExchangeMaxNumOrders(Default::default()) } } impl TryFrom for ExchangeFilters { type Error = serde_json::Error; fn try_from(v: Value) -> Result { let tag = v .get("filterType") .and_then(Value::as_str) .ok_or_else(|| serde_json::Error::custom("missing field `filterType`"))?; match tag { "EXCHANGE_MAX_NUM_ORDERS" => { let payload = serde_json::from_value(v)?; Ok(ExchangeFilters::ExchangeMaxNumOrders(Box::new(payload))) } "EXCHANGE_MAX_NUM_ALGO_ORDERS" => { let payload = serde_json::from_value(v)?; Ok(ExchangeFilters::ExchangeMaxNumAlgoOrders(Box::new(payload))) } "EXCHANGE_MAX_NUM_ICEBERG_ORDERS" => { let payload = serde_json::from_value(v)?; Ok(ExchangeFilters::ExchangeMaxNumIcebergOrders(Box::new( payload, ))) } "EXCHANGE_MAX_NUM_ORDER_LISTS" => { let payload = serde_json::from_value(v)?; Ok(ExchangeFilters::ExchangeMaxNumOrderLists(Box::new(payload))) } _ => Ok(ExchangeFilters::Other(v)), } } } src/spot/websocket_api/models/exchange_info_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInfoResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl ExchangeInfoResponse { #[must_use] pub fn new() -> ExchangeInfoResponse { ExchangeInfoResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/exchange_info_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInfoResponseResult { #[serde(rename = "timezone", skip_serializing_if = "Option::is_none")] pub timezone: Option, #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, #[serde(rename = "exchangeFilters", skip_serializing_if = "Option::is_none")] pub exchange_filters: Option>, #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")] pub symbols: Option>, #[serde(rename = "sors", skip_serializing_if = "Option::is_none")] pub sors: Option>, } impl ExchangeInfoResponseResult { #[must_use] pub fn new() -> ExchangeInfoResponseResult { ExchangeInfoResponseResult { timezone: None, server_time: None, rate_limits: None, exchange_filters: None, symbols: None, sors: None, } } } src/spot/websocket_api/models/exchange_info_response_result_sors_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeInfoResponseResultSorsInner { #[serde(rename = "baseAsset", skip_serializing_if = "Option::is_none")] pub base_asset: Option, #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")] pub symbols: Option>, } impl ExchangeInfoResponseResultSorsInner { #[must_use] pub fn new() -> ExchangeInfoResponseResultSorsInner { ExchangeInfoResponseResultSorsInner { base_asset: None, symbols: None, } } } src/spot/websocket_api/models/exchange_max_num_algo_orders_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumAlgoOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumAlgoOrders", skip_serializing_if = "Option::is_none")] pub max_num_algo_orders: Option, } impl ExchangeMaxNumAlgoOrdersFilter { #[must_use] pub fn new() -> ExchangeMaxNumAlgoOrdersFilter { ExchangeMaxNumAlgoOrdersFilter { filter_type: None, max_num_algo_orders: None, } } } src/spot/websocket_api/models/exchange_max_num_iceberg_orders_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumIcebergOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde( rename = "maxNumIcebergOrders", skip_serializing_if = "Option::is_none" )] pub max_num_iceberg_orders: Option, } impl ExchangeMaxNumIcebergOrdersFilter { #[must_use] pub fn new() -> ExchangeMaxNumIcebergOrdersFilter { ExchangeMaxNumIcebergOrdersFilter { filter_type: None, max_num_iceberg_orders: None, } } } src/spot/websocket_api/models/exchange_max_num_order_lists_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumOrderListsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrderLists", skip_serializing_if = "Option::is_none")] pub max_num_order_lists: Option, } impl ExchangeMaxNumOrderListsFilter { #[must_use] pub fn new() -> ExchangeMaxNumOrderListsFilter { ExchangeMaxNumOrderListsFilter { filter_type: None, max_num_order_lists: None, } } } src/spot/websocket_api/models/exchange_max_num_orders_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrders", skip_serializing_if = "Option::is_none")] pub max_num_orders: Option, } impl ExchangeMaxNumOrdersFilter { #[must_use] pub fn new() -> ExchangeMaxNumOrdersFilter { ExchangeMaxNumOrdersFilter { filter_type: None, max_num_orders: None, } } } src/spot/websocket_api/models/external_lock_update.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExternalLockUpdate { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "d", skip_serializing_if = "Option::is_none")] pub d: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl ExternalLockUpdate { #[must_use] pub fn new() -> ExternalLockUpdate { ExternalLockUpdate { e_uppercase: None, a: None, d: None, t_uppercase: None, } } } src/spot/websocket_api/models/iceberg_parts_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IcebergPartsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, } impl IcebergPartsFilter { #[must_use] pub fn new() -> IcebergPartsFilter { IcebergPartsFilter { filter_type: None, limit: None, } } } src/spot/websocket_api/models/klines_item_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum KlinesItemInner { String(String), Integer(i64), Other(serde_json::Value), } impl Default for KlinesItemInner { fn default() -> Self { Self::String(Default::default()) } } src/spot/websocket_api/models/klines_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlinesResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl KlinesResponse { #[must_use] pub fn new() -> KlinesResponse { KlinesResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/list_status.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ListStatus { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "g", skip_serializing_if = "Option::is_none")] pub g: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "r", skip_serializing_if = "Option::is_none")] pub r: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option>, } impl ListStatus { #[must_use] pub fn new() -> ListStatus { ListStatus { e_uppercase: None, s: None, g: None, c: None, l: None, l_uppercase: None, r: None, c_uppercase: None, t_uppercase: None, o_uppercase: None, } } } src/spot/websocket_api/models/list_status_o_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ListStatusOInner { #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, } impl ListStatusOInner { #[must_use] pub fn new() -> ListStatusOInner { ListStatusOInner { s: None, i: None, c: None, } } } src/spot/websocket_api/models/lot_size_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct LotSizeFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "minQty", skip_serializing_if = "Option::is_none")] pub min_qty: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "stepSize", skip_serializing_if = "Option::is_none")] pub step_size: Option, } impl LotSizeFilter { #[must_use] pub fn new() -> LotSizeFilter { LotSizeFilter { filter_type: None, qty_exponent: None, min_qty: None, max_qty: None, step_size: None, } } } src/spot/websocket_api/models/market_lot_size_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarketLotSizeFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "minQty", skip_serializing_if = "Option::is_none")] pub min_qty: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "stepSize", skip_serializing_if = "Option::is_none")] pub step_size: Option, } impl MarketLotSizeFilter { #[must_use] pub fn new() -> MarketLotSizeFilter { MarketLotSizeFilter { filter_type: None, qty_exponent: None, min_qty: None, max_qty: None, step_size: None, } } } src/spot/websocket_api/models/max_asset_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxAssetFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, } impl MaxAssetFilter { #[must_use] pub fn new() -> MaxAssetFilter { MaxAssetFilter { filter_type: None, qty_exponent: None, limit: None, asset: None, } } } src/spot/websocket_api/models/max_num_algo_orders_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumAlgoOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumAlgoOrders", skip_serializing_if = "Option::is_none")] pub max_num_algo_orders: Option, } impl MaxNumAlgoOrdersFilter { #[must_use] pub fn new() -> MaxNumAlgoOrdersFilter { MaxNumAlgoOrdersFilter { filter_type: None, max_num_algo_orders: None, } } } src/spot/websocket_api/models/max_num_iceberg_orders_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumIcebergOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde( rename = "maxNumIcebergOrders", skip_serializing_if = "Option::is_none" )] pub max_num_iceberg_orders: Option, } impl MaxNumIcebergOrdersFilter { #[must_use] pub fn new() -> MaxNumIcebergOrdersFilter { MaxNumIcebergOrdersFilter { filter_type: None, max_num_iceberg_orders: None, } } } src/spot/websocket_api/models/max_num_order_amends_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumOrderAmendsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrderAmends", skip_serializing_if = "Option::is_none")] pub max_num_order_amends: Option, } impl MaxNumOrderAmendsFilter { #[must_use] pub fn new() -> MaxNumOrderAmendsFilter { MaxNumOrderAmendsFilter { filter_type: None, max_num_order_amends: None, } } } src/spot/websocket_api/models/max_num_order_lists_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumOrderListsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrderLists", skip_serializing_if = "Option::is_none")] pub max_num_order_lists: Option, } impl MaxNumOrderListsFilter { #[must_use] pub fn new() -> MaxNumOrderListsFilter { MaxNumOrderListsFilter { filter_type: None, max_num_order_lists: None, } } } src/spot/websocket_api/models/max_num_orders_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrders", skip_serializing_if = "Option::is_none")] pub max_num_orders: Option, } impl MaxNumOrdersFilter { #[must_use] pub fn new() -> MaxNumOrdersFilter { MaxNumOrdersFilter { filter_type: None, max_num_orders: None, } } } src/spot/websocket_api/models/max_position_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxPositionFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "maxPosition", skip_serializing_if = "Option::is_none")] pub max_position: Option, } impl MaxPositionFilter { #[must_use] pub fn new() -> MaxPositionFilter { MaxPositionFilter { filter_type: None, qty_exponent: None, max_position: None, } } } src/spot/websocket_api/models/min_notional_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MinNotionalFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "priceExponent", skip_serializing_if = "Option::is_none")] pub price_exponent: Option, #[serde(rename = "minNotional", skip_serializing_if = "Option::is_none")] pub min_notional: Option, #[serde(rename = "applyToMarket", skip_serializing_if = "Option::is_none")] pub apply_to_market: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl MinNotionalFilter { #[must_use] pub fn new() -> MinNotionalFilter { MinNotionalFilter { filter_type: None, price_exponent: None, min_notional: None, apply_to_market: None, avg_price_mins: None, } } } src/spot/websocket_api/models/my_allocations_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyAllocationsResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl MyAllocationsResponse { #[must_use] pub fn new() -> MyAllocationsResponse { MyAllocationsResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/my_allocations_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyAllocationsResponseResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "allocationId", skip_serializing_if = "Option::is_none")] pub allocation_id: Option, #[serde(rename = "allocationType", skip_serializing_if = "Option::is_none")] pub allocation_type: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyer", skip_serializing_if = "Option::is_none")] pub is_buyer: Option, #[serde(rename = "isMaker", skip_serializing_if = "Option::is_none")] pub is_maker: Option, #[serde(rename = "isAllocator", skip_serializing_if = "Option::is_none")] pub is_allocator: Option, } impl MyAllocationsResponseResultInner { #[must_use] pub fn new() -> MyAllocationsResponseResultInner { MyAllocationsResponseResultInner { symbol: None, allocation_id: None, allocation_type: None, order_id: None, order_list_id: None, price: None, qty: None, quote_qty: None, commission: None, commission_asset: None, time: None, is_buyer: None, is_maker: None, is_allocator: None, } } } src/spot/websocket_api/models/my_filters_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyFiltersResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl MyFiltersResponse { #[must_use] pub fn new() -> MyFiltersResponse { MyFiltersResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/my_filters_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyFiltersResponseResult { #[serde(rename = "exchangeFilters", skip_serializing_if = "Option::is_none")] pub exchange_filters: Option>, #[serde(rename = "symbolFilters", skip_serializing_if = "Option::is_none")] pub symbol_filters: Option>, #[serde(rename = "assetFilters", skip_serializing_if = "Option::is_none")] pub asset_filters: Option>, } impl MyFiltersResponseResult { #[must_use] pub fn new() -> MyFiltersResponseResult { MyFiltersResponseResult { exchange_filters: None, symbol_filters: None, asset_filters: None, } } } src/spot/websocket_api/models/my_prevented_matches_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyPreventedMatchesResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl MyPreventedMatchesResponse { #[must_use] pub fn new() -> MyPreventedMatchesResponse { MyPreventedMatchesResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/my_prevented_matches_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyPreventedMatchesResponseResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "preventedMatchId", skip_serializing_if = "Option::is_none")] pub prevented_match_id: Option, #[serde(rename = "takerOrderId", skip_serializing_if = "Option::is_none")] pub taker_order_id: Option, #[serde(rename = "makerSymbol", skip_serializing_if = "Option::is_none")] pub maker_symbol: Option, #[serde(rename = "makerOrderId", skip_serializing_if = "Option::is_none")] pub maker_order_id: Option, #[serde(rename = "tradeGroupId", skip_serializing_if = "Option::is_none")] pub trade_group_id: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde( rename = "makerPreventedQuantity", skip_serializing_if = "Option::is_none" )] pub maker_prevented_quantity: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, } impl MyPreventedMatchesResponseResultInner { #[must_use] pub fn new() -> MyPreventedMatchesResponseResultInner { MyPreventedMatchesResponseResultInner { symbol: None, prevented_match_id: None, taker_order_id: None, maker_symbol: None, maker_order_id: None, trade_group_id: None, self_trade_prevention_mode: None, price: None, maker_prevented_quantity: None, transact_time: None, } } } src/spot/websocket_api/models/my_trades_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyTradesResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl MyTradesResponse { #[must_use] pub fn new() -> MyTradesResponse { MyTradesResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/my_trades_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MyTradesResponseResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyer", skip_serializing_if = "Option::is_none")] pub is_buyer: Option, #[serde(rename = "isMaker", skip_serializing_if = "Option::is_none")] pub is_maker: Option, #[serde(rename = "isBestMatch", skip_serializing_if = "Option::is_none")] pub is_best_match: Option, } impl MyTradesResponseResultInner { #[must_use] pub fn new() -> MyTradesResponseResultInner { MyTradesResponseResultInner { symbol: None, id: None, order_id: None, order_list_id: None, price: None, qty: None, quote_qty: None, commission: None, commission_asset: None, time: None, is_buyer: None, is_maker: None, is_best_match: None, } } } src/spot/websocket_api/models/notional_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NotionalFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "priceExponent", skip_serializing_if = "Option::is_none")] pub price_exponent: Option, #[serde(rename = "minNotional", skip_serializing_if = "Option::is_none")] pub min_notional: Option, #[serde(rename = "applyMinToMarket", skip_serializing_if = "Option::is_none")] pub apply_min_to_market: Option, #[serde(rename = "maxNotional", skip_serializing_if = "Option::is_none")] pub max_notional: Option, #[serde(rename = "applyMaxToMarket", skip_serializing_if = "Option::is_none")] pub apply_max_to_market: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl NotionalFilter { #[must_use] pub fn new() -> NotionalFilter { NotionalFilter { filter_type: None, price_exponent: None, min_notional: None, apply_min_to_market: None, max_notional: None, apply_max_to_market: None, avg_price_mins: None, } } } src/spot/websocket_api/models/open_order_lists_status_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenOrderListsStatusResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OpenOrderListsStatusResponse { #[must_use] pub fn new() -> OpenOrderListsStatusResponse { OpenOrderListsStatusResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/open_order_lists_status_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenOrderListsStatusResponseResultInner { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl OpenOrderListsStatusResponseResultInner { #[must_use] pub fn new() -> OpenOrderListsStatusResponseResultInner { OpenOrderListsStatusResponseResultInner { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, } } } src/spot/websocket_api/models/open_order_lists_status_response_result_inner_orders_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenOrderListsStatusResponseResultInnerOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OpenOrderListsStatusResponseResultInnerOrdersInner { #[must_use] pub fn new() -> OpenOrderListsStatusResponseResultInnerOrdersInner { OpenOrderListsStatusResponseResultInnerOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/websocket_api/models/open_orders_cancel_all_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenOrdersCancelAllResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OpenOrdersCancelAllResponse { #[must_use] pub fn new() -> OpenOrdersCancelAllResponse { OpenOrdersCancelAllResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/open_orders_cancel_all_response_result_inner_order_reports_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenOrdersCancelAllResponseResultInnerOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OpenOrdersCancelAllResponseResultInnerOrderReportsInner { #[must_use] pub fn new() -> OpenOrdersCancelAllResponseResultInnerOrderReportsInner { OpenOrdersCancelAllResponseResultInnerOrderReportsInner { symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, self_trade_prevention_mode: None, } } } src/spot/websocket_api/models/open_orders_cancel_all_response_result_inner_orders_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenOrdersCancelAllResponseResultInnerOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OpenOrdersCancelAllResponseResultInnerOrdersInner { #[must_use] pub fn new() -> OpenOrdersCancelAllResponseResultInnerOrdersInner { OpenOrdersCancelAllResponseResultInnerOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/websocket_api/models/open_orders_status_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OpenOrdersStatusResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OpenOrdersStatusResponse { #[must_use] pub fn new() -> OpenOrdersStatusResponse { OpenOrdersStatusResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_amend_keep_priority_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendKeepPriorityResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderAmendKeepPriorityResponse { #[must_use] pub fn new() -> OrderAmendKeepPriorityResponse { OrderAmendKeepPriorityResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_amend_keep_priority_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendKeepPriorityResponseResult { #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "executionId", skip_serializing_if = "Option::is_none")] pub execution_id: Option, #[serde(rename = "amendedOrder", skip_serializing_if = "Option::is_none")] pub amended_order: Option>, #[serde(rename = "listStatus", skip_serializing_if = "Option::is_none")] pub list_status: Option>, } impl OrderAmendKeepPriorityResponseResult { #[must_use] pub fn new() -> OrderAmendKeepPriorityResponseResult { OrderAmendKeepPriorityResponseResult { transact_time: None, execution_id: None, amended_order: None, list_status: None, } } } src/spot/websocket_api/models/order_amend_keep_priority_response_result_amended_order.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendKeepPriorityResponseResultAmendedOrder { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "preventedQty", skip_serializing_if = "Option::is_none")] pub prevented_qty: Option, #[serde(rename = "quoteOrderQty", skip_serializing_if = "Option::is_none")] pub quote_order_qty: Option, #[serde(rename = "cumulativeQuoteQty", skip_serializing_if = "Option::is_none")] pub cumulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderAmendKeepPriorityResponseResultAmendedOrder { #[must_use] pub fn new() -> OrderAmendKeepPriorityResponseResultAmendedOrder { OrderAmendKeepPriorityResponseResultAmendedOrder { symbol: None, order_id: None, order_list_id: None, orig_client_order_id: None, client_order_id: None, price: None, qty: None, executed_qty: None, prevented_qty: None, quote_order_qty: None, cumulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, self_trade_prevention_mode: None, } } } src/spot/websocket_api/models/order_amend_keep_priority_response_result_list_status.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendKeepPriorityResponseResultListStatus { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, } impl OrderAmendKeepPriorityResponseResultListStatus { #[must_use] pub fn new() -> OrderAmendKeepPriorityResponseResultListStatus { OrderAmendKeepPriorityResponseResultListStatus { order_list_id: None, contingency_type: None, list_order_status: None, list_client_order_id: None, symbol: None, orders: None, } } } src/spot/websocket_api/models/order_amend_keep_priority_response_result_list_status_orders_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendKeepPriorityResponseResultListStatusOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OrderAmendKeepPriorityResponseResultListStatusOrdersInner { #[must_use] pub fn new() -> OrderAmendKeepPriorityResponseResultListStatusOrdersInner { OrderAmendKeepPriorityResponseResultListStatusOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/websocket_api/models/order_amendments_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendmentsResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderAmendmentsResponse { #[must_use] pub fn new() -> OrderAmendmentsResponse { OrderAmendmentsResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_amendments_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderAmendmentsResponseResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "executionId", skip_serializing_if = "Option::is_none")] pub execution_id: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "newClientOrderId", skip_serializing_if = "Option::is_none")] pub new_client_order_id: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "newQty", skip_serializing_if = "Option::is_none")] pub new_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl OrderAmendmentsResponseResultInner { #[must_use] pub fn new() -> OrderAmendmentsResponseResultInner { OrderAmendmentsResponseResultInner { symbol: None, order_id: None, execution_id: None, orig_client_order_id: None, new_client_order_id: None, orig_qty: None, new_qty: None, time: None, } } } src/spot/websocket_api/models/order_cancel_replace_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelReplaceResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderCancelReplaceResponse { #[must_use] pub fn new() -> OrderCancelReplaceResponse { OrderCancelReplaceResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_cancel_replace_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelReplaceResponseResult { #[serde(rename = "cancelResult", skip_serializing_if = "Option::is_none")] pub cancel_result: Option, #[serde(rename = "newOrderResult", skip_serializing_if = "Option::is_none")] pub new_order_result: Option, #[serde(rename = "cancelResponse", skip_serializing_if = "Option::is_none")] pub cancel_response: Option>, #[serde(rename = "newOrderResponse", skip_serializing_if = "Option::is_none")] pub new_order_response: Option>, } impl OrderCancelReplaceResponseResult { #[must_use] pub fn new() -> OrderCancelReplaceResponseResult { OrderCancelReplaceResponseResult { cancel_result: None, new_order_result: None, cancel_response: None, new_order_response: None, } } } src/spot/websocket_api/models/order_cancel_replace_response_result_cancel_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelReplaceResponseResultCancelResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "origClientOrderId", skip_serializing_if = "Option::is_none")] pub orig_client_order_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderCancelReplaceResponseResultCancelResponse { #[must_use] pub fn new() -> OrderCancelReplaceResponseResultCancelResponse { OrderCancelReplaceResponseResultCancelResponse { symbol: None, orig_client_order_id: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, self_trade_prevention_mode: None, } } } src/spot/websocket_api/models/order_cancel_replace_response_result_new_order_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelReplaceResponseResultNewOrderResponse { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderCancelReplaceResponseResultNewOrderResponse { #[must_use] pub fn new() -> OrderCancelReplaceResponseResultNewOrderResponse { OrderCancelReplaceResponseResultNewOrderResponse { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, self_trade_prevention_mode: None, } } } src/spot/websocket_api/models/order_cancel_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderCancelResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderCancelResponse { #[must_use] pub fn new() -> OrderCancelResponse { OrderCancelResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_list_cancel_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListCancelResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderListCancelResponse { #[must_use] pub fn new() -> OrderListCancelResponse { OrderListCancelResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_list_cancel_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListCancelResponseResult { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl OrderListCancelResponseResult { #[must_use] pub fn new() -> OrderListCancelResponseResult { OrderListCancelResponseResult { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/spot/websocket_api/models/order_list_cancel_response_result_order_reports_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListCancelResponseResultOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderListCancelResponseResultOrderReportsInner { #[must_use] pub fn new() -> OrderListCancelResponseResultOrderReportsInner { OrderListCancelResponseResultOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, self_trade_prevention_mode: None, } } } src/spot/websocket_api/models/order_list_cancel_response_result_orders_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListCancelResponseResultOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OrderListCancelResponseResultOrdersInner { #[must_use] pub fn new() -> OrderListCancelResponseResultOrdersInner { OrderListCancelResponseResultOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/websocket_api/models/order_list_place_oco_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOcoResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderListPlaceOcoResponse { #[must_use] pub fn new() -> OrderListPlaceOcoResponse { OrderListPlaceOcoResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_list_place_oco_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOcoResponseResult { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl OrderListPlaceOcoResponseResult { #[must_use] pub fn new() -> OrderListPlaceOcoResponseResult { OrderListPlaceOcoResponseResult { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/spot/websocket_api/models/order_list_place_oco_response_result_order_reports_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOcoResponseResultOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderListPlaceOcoResponseResultOrderReportsInner { #[must_use] pub fn new() -> OrderListPlaceOcoResponseResultOrderReportsInner { OrderListPlaceOcoResponseResultOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, working_time: None, self_trade_prevention_mode: None, } } } src/spot/websocket_api/models/order_list_place_oco_response_result_orders_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOcoResponseResultOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OrderListPlaceOcoResponseResultOrdersInner { #[must_use] pub fn new() -> OrderListPlaceOcoResponseResultOrdersInner { OrderListPlaceOcoResponseResultOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/websocket_api/models/order_list_place_oto_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOtoResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderListPlaceOtoResponse { #[must_use] pub fn new() -> OrderListPlaceOtoResponse { OrderListPlaceOtoResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_list_place_oto_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOtoResponseResult { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl OrderListPlaceOtoResponseResult { #[must_use] pub fn new() -> OrderListPlaceOtoResponseResult { OrderListPlaceOtoResponseResult { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/spot/websocket_api/models/order_list_place_oto_response_result_order_reports_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOtoResponseResultOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderListPlaceOtoResponseResultOrderReportsInner { #[must_use] pub fn new() -> OrderListPlaceOtoResponseResultOrderReportsInner { OrderListPlaceOtoResponseResultOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, self_trade_prevention_mode: None, } } } src/spot/websocket_api/models/order_list_place_oto_response_result_orders_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOtoResponseResultOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OrderListPlaceOtoResponseResultOrdersInner { #[must_use] pub fn new() -> OrderListPlaceOtoResponseResultOrdersInner { OrderListPlaceOtoResponseResultOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/websocket_api/models/order_list_place_otoco_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOtocoResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderListPlaceOtocoResponse { #[must_use] pub fn new() -> OrderListPlaceOtocoResponse { OrderListPlaceOtocoResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_list_place_otoco_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOtocoResponseResult { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl OrderListPlaceOtocoResponseResult { #[must_use] pub fn new() -> OrderListPlaceOtocoResponseResult { OrderListPlaceOtocoResponseResult { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/spot/websocket_api/models/order_list_place_otoco_response_result_order_reports_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOtocoResponseResultOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, } impl OrderListPlaceOtocoResponseResultOrderReportsInner { #[must_use] pub fn new() -> OrderListPlaceOtocoResponseResultOrderReportsInner { OrderListPlaceOtocoResponseResultOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, self_trade_prevention_mode: None, stop_price: None, } } } src/spot/websocket_api/models/order_list_place_otoco_response_result_orders_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceOtocoResponseResultOrdersInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, } impl OrderListPlaceOtocoResponseResultOrdersInner { #[must_use] pub fn new() -> OrderListPlaceOtocoResponseResultOrdersInner { OrderListPlaceOtocoResponseResultOrdersInner { symbol: None, order_id: None, client_order_id: None, } } } src/spot/websocket_api/models/order_list_place_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderListPlaceResponse { #[must_use] pub fn new() -> OrderListPlaceResponse { OrderListPlaceResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_list_place_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceResponseResult { #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "contingencyType", skip_serializing_if = "Option::is_none")] pub contingency_type: Option, #[serde(rename = "listStatusType", skip_serializing_if = "Option::is_none")] pub list_status_type: Option, #[serde(rename = "listOrderStatus", skip_serializing_if = "Option::is_none")] pub list_order_status: Option, #[serde(rename = "listClientOrderId", skip_serializing_if = "Option::is_none")] pub list_client_order_id: Option, #[serde(rename = "transactionTime", skip_serializing_if = "Option::is_none")] pub transaction_time: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orders", skip_serializing_if = "Option::is_none")] pub orders: Option>, #[serde(rename = "orderReports", skip_serializing_if = "Option::is_none")] pub order_reports: Option>, } impl OrderListPlaceResponseResult { #[must_use] pub fn new() -> OrderListPlaceResponseResult { OrderListPlaceResponseResult { order_list_id: None, contingency_type: None, list_status_type: None, list_order_status: None, list_client_order_id: None, transaction_time: None, symbol: None, orders: None, order_reports: None, } } } src/spot/websocket_api/models/order_list_place_response_result_order_reports_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListPlaceResponseResultOrderReportsInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "stopPrice", skip_serializing_if = "Option::is_none")] pub stop_price: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, } impl OrderListPlaceResponseResultOrderReportsInner { #[must_use] pub fn new() -> OrderListPlaceResponseResultOrderReportsInner { OrderListPlaceResponseResultOrderReportsInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, stop_price: None, working_time: None, self_trade_prevention_mode: None, } } } src/spot/websocket_api/models/order_list_status_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderListStatusResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderListStatusResponse { #[must_use] pub fn new() -> OrderListStatusResponse { OrderListStatusResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_place_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderPlaceResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderPlaceResponse { #[must_use] pub fn new() -> OrderPlaceResponse { OrderPlaceResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_place_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderPlaceResponseResult { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "fills", skip_serializing_if = "Option::is_none")] pub fills: Option>, } impl OrderPlaceResponseResult { #[must_use] pub fn new() -> OrderPlaceResponseResult { OrderPlaceResponseResult { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, self_trade_prevention_mode: None, fills: None, } } } src/spot/websocket_api/models/order_place_response_result_fills_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderPlaceResponseResultFillsInner { #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, } impl OrderPlaceResponseResultFillsInner { #[must_use] pub fn new() -> OrderPlaceResponseResultFillsInner { OrderPlaceResponseResultFillsInner { price: None, qty: None, commission: None, commission_asset: None, trade_id: None, } } } src/spot/websocket_api/models/order_status_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderStatusResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderStatusResponse { #[must_use] pub fn new() -> OrderStatusResponse { OrderStatusResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_test_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTestResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl OrderTestResponse { #[must_use] pub fn new() -> OrderTestResponse { OrderTestResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/order_test_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTestResponseResult { #[serde( rename = "standardCommissionForOrder", skip_serializing_if = "Option::is_none" )] pub standard_commission_for_order: Option>, #[serde( rename = "specialCommissionForOrder", skip_serializing_if = "Option::is_none" )] pub special_commission_for_order: Option>, #[serde( rename = "taxCommissionForOrder", skip_serializing_if = "Option::is_none" )] pub tax_commission_for_order: Option>, #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] pub discount: Option>, } impl OrderTestResponseResult { #[must_use] pub fn new() -> OrderTestResponseResult { OrderTestResponseResult { standard_commission_for_order: None, special_commission_for_order: None, tax_commission_for_order: None, discount: None, } } } src/spot/websocket_api/models/order_test_response_result_discount.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTestResponseResultDiscount { #[serde(rename = "enabledForAccount", skip_serializing_if = "Option::is_none")] pub enabled_for_account: Option, #[serde(rename = "enabledForSymbol", skip_serializing_if = "Option::is_none")] pub enabled_for_symbol: Option, #[serde(rename = "discountAsset", skip_serializing_if = "Option::is_none")] pub discount_asset: Option, #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] pub discount: Option, } impl OrderTestResponseResultDiscount { #[must_use] pub fn new() -> OrderTestResponseResultDiscount { OrderTestResponseResultDiscount { enabled_for_account: None, enabled_for_symbol: None, discount_asset: None, discount: None, } } } src/spot/websocket_api/models/order_test_response_result_special_commission_for_order.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTestResponseResultSpecialCommissionForOrder { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, } impl OrderTestResponseResultSpecialCommissionForOrder { #[must_use] pub fn new() -> OrderTestResponseResultSpecialCommissionForOrder { OrderTestResponseResultSpecialCommissionForOrder { maker: None, taker: None, } } } src/spot/websocket_api/models/order_test_response_result_standard_commission_for_order.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OrderTestResponseResultStandardCommissionForOrder { #[serde(rename = "maker", skip_serializing_if = "Option::is_none")] pub maker: Option, #[serde(rename = "taker", skip_serializing_if = "Option::is_none")] pub taker: Option, } impl OrderTestResponseResultStandardCommissionForOrder { #[must_use] pub fn new() -> OrderTestResponseResultStandardCommissionForOrder { OrderTestResponseResultStandardCommissionForOrder { maker: None, taker: None, } } } src/spot/websocket_api/models/outbound_account_position.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OutboundAccountPosition { #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option>, } impl OutboundAccountPosition { #[must_use] pub fn new() -> OutboundAccountPosition { OutboundAccountPosition { e_uppercase: None, u: None, b_uppercase: None, } } } src/spot/websocket_api/models/outbound_account_position_b_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OutboundAccountPositionBInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, } impl OutboundAccountPositionBInner { #[must_use] pub fn new() -> OutboundAccountPositionBInner { OutboundAccountPositionBInner { a: None, f: None, l: None, } } } src/spot/websocket_api/models/percent_price_by_side_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PercentPriceBySideFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "multiplierExponent", skip_serializing_if = "Option::is_none")] pub multiplier_exponent: Option, #[serde(rename = "bidMultiplierUp", skip_serializing_if = "Option::is_none")] pub bid_multiplier_up: Option, #[serde(rename = "bidMultiplierDown", skip_serializing_if = "Option::is_none")] pub bid_multiplier_down: Option, #[serde(rename = "askMultiplierUp", skip_serializing_if = "Option::is_none")] pub ask_multiplier_up: Option, #[serde(rename = "askMultiplierDown", skip_serializing_if = "Option::is_none")] pub ask_multiplier_down: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl PercentPriceBySideFilter { #[must_use] pub fn new() -> PercentPriceBySideFilter { PercentPriceBySideFilter { filter_type: None, multiplier_exponent: None, bid_multiplier_up: None, bid_multiplier_down: None, ask_multiplier_up: None, ask_multiplier_down: None, avg_price_mins: None, } } } src/spot/websocket_api/models/percent_price_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PercentPriceFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "multiplierExponent", skip_serializing_if = "Option::is_none")] pub multiplier_exponent: Option, #[serde(rename = "multiplierUp", skip_serializing_if = "Option::is_none")] pub multiplier_up: Option, #[serde(rename = "multiplierDown", skip_serializing_if = "Option::is_none")] pub multiplier_down: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl PercentPriceFilter { #[must_use] pub fn new() -> PercentPriceFilter { PercentPriceFilter { filter_type: None, multiplier_exponent: None, multiplier_up: None, multiplier_down: None, avg_price_mins: None, } } } src/spot/websocket_api/models/ping_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PingResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl PingResponse { #[must_use] pub fn new() -> PingResponse { PingResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/price_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PriceFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "priceExponent", skip_serializing_if = "Option::is_none")] pub price_exponent: Option, #[serde(rename = "minPrice", skip_serializing_if = "Option::is_none")] pub min_price: Option, #[serde(rename = "maxPrice", skip_serializing_if = "Option::is_none")] pub max_price: Option, #[serde(rename = "tickSize", skip_serializing_if = "Option::is_none")] pub tick_size: Option, } impl PriceFilter { #[must_use] pub fn new() -> PriceFilter { PriceFilter { filter_type: None, price_exponent: None, min_price: None, max_price: None, tick_size: None, } } } src/spot/websocket_api/models/rate_limits.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RateLimits { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl RateLimits { #[must_use] pub fn new() -> RateLimits { RateLimits { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/spot/websocket_api/models/session_logon_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SessionLogonResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, } impl SessionLogonResponse { #[must_use] pub fn new() -> SessionLogonResponse { SessionLogonResponse { id: None, status: None, result: None, } } } src/spot/websocket_api/models/session_logon_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SessionLogonResponseResult { #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")] pub api_key: Option, #[serde(rename = "authorizedSince", skip_serializing_if = "Option::is_none")] pub authorized_since: Option, #[serde(rename = "connectedSince", skip_serializing_if = "Option::is_none")] pub connected_since: Option, #[serde(rename = "returnRateLimits", skip_serializing_if = "Option::is_none")] pub return_rate_limits: Option, #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, #[serde(rename = "userDataStream", skip_serializing_if = "Option::is_none")] pub user_data_stream: Option, } impl SessionLogonResponseResult { #[must_use] pub fn new() -> SessionLogonResponseResult { SessionLogonResponseResult { api_key: None, authorized_since: None, connected_since: None, return_rate_limits: None, server_time: None, user_data_stream: None, } } } src/spot/websocket_api/models/session_logout_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SessionLogoutResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, } impl SessionLogoutResponse { #[must_use] pub fn new() -> SessionLogoutResponse { SessionLogoutResponse { id: None, status: None, result: None, } } } src/spot/websocket_api/models/session_logout_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SessionLogoutResponseResult { #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")] pub api_key: Option, #[serde(rename = "authorizedSince", skip_serializing_if = "Option::is_none")] pub authorized_since: Option, #[serde(rename = "connectedSince", skip_serializing_if = "Option::is_none")] pub connected_since: Option, #[serde(rename = "returnRateLimits", skip_serializing_if = "Option::is_none")] pub return_rate_limits: Option, #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, #[serde(rename = "userDataStream", skip_serializing_if = "Option::is_none")] pub user_data_stream: Option, } impl SessionLogoutResponseResult { #[must_use] pub fn new() -> SessionLogoutResponseResult { SessionLogoutResponseResult { api_key: None, authorized_since: None, connected_since: None, return_rate_limits: None, server_time: None, user_data_stream: None, } } } src/spot/websocket_api/models/session_status_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SessionStatusResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, } impl SessionStatusResponse { #[must_use] pub fn new() -> SessionStatusResponse { SessionStatusResponse { id: None, status: None, result: None, } } } src/spot/websocket_api/models/session_status_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SessionStatusResponseResult { #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")] pub api_key: Option, #[serde(rename = "authorizedSince", skip_serializing_if = "Option::is_none")] pub authorized_since: Option, #[serde(rename = "connectedSince", skip_serializing_if = "Option::is_none")] pub connected_since: Option, #[serde(rename = "returnRateLimits", skip_serializing_if = "Option::is_none")] pub return_rate_limits: Option, #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, #[serde(rename = "userDataStream", skip_serializing_if = "Option::is_none")] pub user_data_stream: Option, } impl SessionStatusResponseResult { #[must_use] pub fn new() -> SessionStatusResponseResult { SessionStatusResponseResult { api_key: None, authorized_since: None, connected_since: None, return_rate_limits: None, server_time: None, user_data_stream: None, } } } src/spot/websocket_api/models/session_subscriptions_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SessionSubscriptionsResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, } impl SessionSubscriptionsResponse { #[must_use] pub fn new() -> SessionSubscriptionsResponse { SessionSubscriptionsResponse { id: None, status: None, result: None, } } } src/spot/websocket_api/models/session_subscriptions_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SessionSubscriptionsResponseResultInner { #[serde(rename = "subscriptionId", skip_serializing_if = "Option::is_none")] pub subscription_id: Option, } impl SessionSubscriptionsResponseResultInner { #[must_use] pub fn new() -> SessionSubscriptionsResponseResultInner { SessionSubscriptionsResponseResultInner { subscription_id: None, } } } src/spot/websocket_api/models/sor_order_place_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SorOrderPlaceResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl SorOrderPlaceResponse { #[must_use] pub fn new() -> SorOrderPlaceResponse { SorOrderPlaceResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/sor_order_place_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SorOrderPlaceResponseResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "orderListId", skip_serializing_if = "Option::is_none")] pub order_list_id: Option, #[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")] pub client_order_id: Option, #[serde(rename = "transactTime", skip_serializing_if = "Option::is_none")] pub transact_time: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "origQty", skip_serializing_if = "Option::is_none")] pub orig_qty: Option, #[serde(rename = "executedQty", skip_serializing_if = "Option::is_none")] pub executed_qty: Option, #[serde(rename = "origQuoteOrderQty", skip_serializing_if = "Option::is_none")] pub orig_quote_order_qty: Option, #[serde( rename = "cummulativeQuoteQty", skip_serializing_if = "Option::is_none" )] pub cummulative_quote_qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "timeInForce", skip_serializing_if = "Option::is_none")] pub time_in_force: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "workingTime", skip_serializing_if = "Option::is_none")] pub working_time: Option, #[serde(rename = "fills", skip_serializing_if = "Option::is_none")] pub fills: Option>, #[serde(rename = "workingFloor", skip_serializing_if = "Option::is_none")] pub working_floor: Option, #[serde( rename = "selfTradePreventionMode", skip_serializing_if = "Option::is_none" )] pub self_trade_prevention_mode: Option, #[serde(rename = "usedSor", skip_serializing_if = "Option::is_none")] pub used_sor: Option, } impl SorOrderPlaceResponseResultInner { #[must_use] pub fn new() -> SorOrderPlaceResponseResultInner { SorOrderPlaceResponseResultInner { symbol: None, order_id: None, order_list_id: None, client_order_id: None, transact_time: None, price: None, orig_qty: None, executed_qty: None, orig_quote_order_qty: None, cummulative_quote_qty: None, status: None, time_in_force: None, r#type: None, side: None, working_time: None, fills: None, working_floor: None, self_trade_prevention_mode: None, used_sor: None, } } } src/spot/websocket_api/models/sor_order_place_response_result_inner_fills_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SorOrderPlaceResponseResultInnerFillsInner { #[serde(rename = "matchType", skip_serializing_if = "Option::is_none")] pub match_type: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "commission", skip_serializing_if = "Option::is_none")] pub commission: Option, #[serde(rename = "commissionAsset", skip_serializing_if = "Option::is_none")] pub commission_asset: Option, #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")] pub trade_id: Option, #[serde(rename = "allocId", skip_serializing_if = "Option::is_none")] pub alloc_id: Option, } impl SorOrderPlaceResponseResultInnerFillsInner { #[must_use] pub fn new() -> SorOrderPlaceResponseResultInnerFillsInner { SorOrderPlaceResponseResultInnerFillsInner { match_type: None, price: None, qty: None, commission: None, commission_asset: None, trade_id: None, alloc_id: None, } } } src/spot/websocket_api/models/sor_order_test_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SorOrderTestResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl SorOrderTestResponse { #[must_use] pub fn new() -> SorOrderTestResponse { SorOrderTestResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/sor_order_test_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SorOrderTestResponseResult { #[serde( rename = "standardCommissionForOrder", skip_serializing_if = "Option::is_none" )] pub standard_commission_for_order: Option>, #[serde( rename = "taxCommissionForOrder", skip_serializing_if = "Option::is_none" )] pub tax_commission_for_order: Option>, #[serde(rename = "discount", skip_serializing_if = "Option::is_none")] pub discount: Option>, } impl SorOrderTestResponseResult { #[must_use] pub fn new() -> SorOrderTestResponseResult { SorOrderTestResponseResult { standard_commission_for_order: None, tax_commission_for_order: None, discount: None, } } } src/spot/websocket_api/models/t_plus_sell_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TPlusSellFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")] pub end_time: Option, } impl TPlusSellFilter { #[must_use] pub fn new() -> TPlusSellFilter { TPlusSellFilter { filter_type: None, end_time: None, } } } src/spot/websocket_api/models/ticker24hr_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum Ticker24hrResponse { Ticker24hrResponse1(Box), Ticker24hrResponse2(Box), Other(serde_json::Value), } impl Default for Ticker24hrResponse { fn default() -> Self { Self::Ticker24hrResponse1(Default::default()) } } src/spot/websocket_api/models/ticker24hr_response1.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Ticker24hrResponse1 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl Ticker24hrResponse1 { #[must_use] pub fn new() -> Ticker24hrResponse1 { Ticker24hrResponse1 { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/ticker24hr_response2.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Ticker24hrResponse2 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl Ticker24hrResponse2 { #[must_use] pub fn new() -> Ticker24hrResponse2 { Ticker24hrResponse2 { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/ticker_book_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TickerBookResponse { TickerBookResponse1(Box), TickerBookResponse2(Box), Other(serde_json::Value), } impl Default for TickerBookResponse { fn default() -> Self { Self::TickerBookResponse1(Default::default()) } } src/spot/websocket_api/models/ticker_book_response1.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerBookResponse1 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TickerBookResponse1 { #[must_use] pub fn new() -> TickerBookResponse1 { TickerBookResponse1 { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/ticker_book_response1_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerBookResponse1Result { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "bidQty", skip_serializing_if = "Option::is_none")] pub bid_qty: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "askQty", skip_serializing_if = "Option::is_none")] pub ask_qty: Option, } impl TickerBookResponse1Result { #[must_use] pub fn new() -> TickerBookResponse1Result { TickerBookResponse1Result { symbol: None, bid_price: None, bid_qty: None, ask_price: None, ask_qty: None, } } } src/spot/websocket_api/models/ticker_book_response2.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerBookResponse2 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TickerBookResponse2 { #[must_use] pub fn new() -> TickerBookResponse2 { TickerBookResponse2 { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/ticker_book_response2_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerBookResponse2ResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "bidPrice", skip_serializing_if = "Option::is_none")] pub bid_price: Option, #[serde(rename = "bidQty", skip_serializing_if = "Option::is_none")] pub bid_qty: Option, #[serde(rename = "askPrice", skip_serializing_if = "Option::is_none")] pub ask_price: Option, #[serde(rename = "askQty", skip_serializing_if = "Option::is_none")] pub ask_qty: Option, } impl TickerBookResponse2ResultInner { #[must_use] pub fn new() -> TickerBookResponse2ResultInner { TickerBookResponse2ResultInner { symbol: None, bid_price: None, bid_qty: None, ask_price: None, ask_qty: None, } } } src/spot/websocket_api/models/ticker_price_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TickerPriceResponse { TickerPriceResponse1(Box), TickerPriceResponse2(Box), Other(serde_json::Value), } impl Default for TickerPriceResponse { fn default() -> Self { Self::TickerPriceResponse1(Default::default()) } } src/spot/websocket_api/models/ticker_price_response1.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerPriceResponse1 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TickerPriceResponse1 { #[must_use] pub fn new() -> TickerPriceResponse1 { TickerPriceResponse1 { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/ticker_price_response1_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerPriceResponse1Result { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, } impl TickerPriceResponse1Result { #[must_use] pub fn new() -> TickerPriceResponse1Result { TickerPriceResponse1Result { symbol: None, price: None, } } } src/spot/websocket_api/models/ticker_price_response2.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerPriceResponse2 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TickerPriceResponse2 { #[must_use] pub fn new() -> TickerPriceResponse2 { TickerPriceResponse2 { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/ticker_price_response2_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerPriceResponse2ResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, } impl TickerPriceResponse2ResultInner { #[must_use] pub fn new() -> TickerPriceResponse2ResultInner { TickerPriceResponse2ResultInner { symbol: None, price: None, } } } src/spot/websocket_api/models/ticker_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(untagged)] pub enum TickerResponse { TickerResponse1(Box), TickerResponse2(Box), Other(serde_json::Value), } impl Default for TickerResponse { fn default() -> Self { Self::TickerResponse1(Default::default()) } } src/spot/websocket_api/models/ticker_response1.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerResponse1 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TickerResponse1 { #[must_use] pub fn new() -> TickerResponse1 { TickerResponse1 { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/ticker_response1_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerResponse1Result { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl TickerResponse1Result { #[must_use] pub fn new() -> TickerResponse1Result { TickerResponse1Result { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, open_price: None, high_price: None, low_price: None, last_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/spot/websocket_api/models/ticker_response2.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerResponse2 { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TickerResponse2 { #[must_use] pub fn new() -> TickerResponse2 { TickerResponse2 { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/ticker_response2_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerResponse2ResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl TickerResponse2ResultInner { #[must_use] pub fn new() -> TickerResponse2ResultInner { TickerResponse2ResultInner { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, open_price: None, high_price: None, low_price: None, last_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/spot/websocket_api/models/ticker_trading_day_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerTradingDayResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TickerTradingDayResponse { #[must_use] pub fn new() -> TickerTradingDayResponse { TickerTradingDayResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/ticker_trading_day_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerTradingDayResponseResultInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")] pub price_change: Option, #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")] pub price_change_percent: Option, #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")] pub weighted_avg_price: Option, #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")] pub open_price: Option, #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")] pub high_price: Option, #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")] pub low_price: Option, #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")] pub last_price: Option, #[serde(rename = "volume", skip_serializing_if = "Option::is_none")] pub volume: Option, #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")] pub quote_volume: Option, #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")] pub close_time: Option, #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")] pub first_id: Option, #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")] pub last_id: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl TickerTradingDayResponseResultInner { #[must_use] pub fn new() -> TickerTradingDayResponseResultInner { TickerTradingDayResponseResultInner { symbol: None, price_change: None, price_change_percent: None, weighted_avg_price: None, open_price: None, high_price: None, low_price: None, last_price: None, volume: None, quote_volume: None, open_time: None, close_time: None, first_id: None, last_id: None, count: None, } } } src/spot/websocket_api/models/time_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TimeResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TimeResponse { #[must_use] pub fn new() -> TimeResponse { TimeResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/time_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TimeResponseResult { #[serde(rename = "serverTime", skip_serializing_if = "Option::is_none")] pub server_time: Option, } impl TimeResponseResult { #[must_use] pub fn new() -> TimeResponseResult { TimeResponseResult { server_time: None } } } src/spot/websocket_api/models/trades_aggregate_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TradesAggregateResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TradesAggregateResponse { #[must_use] pub fn new() -> TradesAggregateResponse { TradesAggregateResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/trades_aggregate_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TradesAggregateResponseResultInner { #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, #[serde(rename = "M", skip_serializing_if = "Option::is_none")] pub m_uppercase: Option, } impl TradesAggregateResponseResultInner { #[must_use] pub fn new() -> TradesAggregateResponseResultInner { TradesAggregateResponseResultInner { a: None, p: None, q: None, f: None, l: None, t_uppercase: None, m: None, m_uppercase: None, } } } src/spot/websocket_api/models/trades_historical_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TradesHistoricalResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TradesHistoricalResponse { #[must_use] pub fn new() -> TradesHistoricalResponse { TradesHistoricalResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/trades_historical_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TradesHistoricalResponseResultInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyerMaker", skip_serializing_if = "Option::is_none")] pub is_buyer_maker: Option, #[serde(rename = "isBestMatch", skip_serializing_if = "Option::is_none")] pub is_best_match: Option, } impl TradesHistoricalResponseResultInner { #[must_use] pub fn new() -> TradesHistoricalResponseResultInner { TradesHistoricalResponseResultInner { id: None, price: None, qty: None, quote_qty: None, time: None, is_buyer_maker: None, is_best_match: None, } } } src/spot/websocket_api/models/trades_recent_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TradesRecentResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl TradesRecentResponse { #[must_use] pub fn new() -> TradesRecentResponse { TradesRecentResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/trades_recent_response_result_inner.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TradesRecentResponseResultInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "quoteQty", skip_serializing_if = "Option::is_none")] pub quote_qty: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "isBuyerMaker", skip_serializing_if = "Option::is_none")] pub is_buyer_maker: Option, #[serde(rename = "isBestMatch", skip_serializing_if = "Option::is_none")] pub is_best_match: Option, } impl TradesRecentResponseResultInner { #[must_use] pub fn new() -> TradesRecentResponseResultInner { TradesRecentResponseResultInner { id: None, price: None, qty: None, quote_qty: None, time: None, is_buyer_maker: None, is_best_match: None, } } } src/spot/websocket_api/models/trailing_delta_filter.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TrailingDeltaFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde( rename = "minTrailingAboveDelta", skip_serializing_if = "Option::is_none" )] pub min_trailing_above_delta: Option, #[serde( rename = "maxTrailingAboveDelta", skip_serializing_if = "Option::is_none" )] pub max_trailing_above_delta: Option, #[serde( rename = "minTrailingBelowDelta", skip_serializing_if = "Option::is_none" )] pub min_trailing_below_delta: Option, #[serde( rename = "maxTrailingBelowDelta", skip_serializing_if = "Option::is_none" )] pub max_trailing_below_delta: Option, } impl TrailingDeltaFilter { #[must_use] pub fn new() -> TrailingDeltaFilter { TrailingDeltaFilter { filter_type: None, min_trailing_above_delta: None, max_trailing_above_delta: None, min_trailing_below_delta: None, max_trailing_below_delta: None, } } } src/spot/websocket_api/models/ui_klines_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UiKlinesResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>>, #[serde(rename = "rateLimits", skip_serializing_if = "Option::is_none")] pub rate_limits: Option>, } impl UiKlinesResponse { #[must_use] pub fn new() -> UiKlinesResponse { UiKlinesResponse { id: None, status: None, result: None, rate_limits: None, } } } src/spot/websocket_api/models/user_data_stream_events_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(try_from = "Value")] pub enum UserDataStreamEventsResponse { #[serde(rename = "outboundAccountPosition")] OutboundAccountPosition(Box), #[serde(rename = "balanceUpdate")] BalanceUpdate(Box), #[serde(rename = "executionReport")] ExecutionReport(Box), #[serde(rename = "listStatus")] ListStatus(Box), #[serde(rename = "eventStreamTerminated")] EventStreamTerminated(Box), #[serde(rename = "externalLockUpdate")] ExternalLockUpdate(Box), Other(serde_json::Value), } impl Default for UserDataStreamEventsResponse { fn default() -> Self { Self::OutboundAccountPosition(Default::default()) } } impl TryFrom for UserDataStreamEventsResponse { type Error = serde_json::Error; fn try_from(v: Value) -> Result { let tag = v .get("e") .and_then(Value::as_str) .ok_or_else(|| serde_json::Error::custom("missing field `e`"))?; match tag { "outboundAccountPosition" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::OutboundAccountPosition( Box::new(payload), )) } "balanceUpdate" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::BalanceUpdate(Box::new( payload, ))) } "executionReport" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::ExecutionReport(Box::new( payload, ))) } "listStatus" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::ListStatus(Box::new(payload))) } "eventStreamTerminated" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::EventStreamTerminated( Box::new(payload), )) } "externalLockUpdate" => { let payload = serde_json::from_value(v)?; Ok(UserDataStreamEventsResponse::ExternalLockUpdate(Box::new( payload, ))) } _ => Ok(UserDataStreamEventsResponse::Other(v)), } } } src/spot/websocket_api/models/user_data_stream_subscribe_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UserDataStreamSubscribeResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, } impl UserDataStreamSubscribeResponse { #[must_use] pub fn new() -> UserDataStreamSubscribeResponse { UserDataStreamSubscribeResponse { id: None, status: None, result: None, } } } src/spot/websocket_api/models/user_data_stream_subscribe_response_result.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UserDataStreamSubscribeResponseResult { #[serde(rename = "subscriptionId", skip_serializing_if = "Option::is_none")] pub subscription_id: Option, } impl UserDataStreamSubscribeResponseResult { #[must_use] pub fn new() -> UserDataStreamSubscribeResponseResult { UserDataStreamSubscribeResponseResult { subscription_id: None, } } } src/spot/websocket_api/models/user_data_stream_subscribe_signature_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UserDataStreamSubscribeSignatureResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, } impl UserDataStreamSubscribeSignatureResponse { #[must_use] pub fn new() -> UserDataStreamSubscribeSignatureResponse { UserDataStreamSubscribeSignatureResponse { id: None, status: None, result: None, } } } src/spot/websocket_api/models/user_data_stream_unsubscribe_response.rs /* * Binance Spot WebSocket API * * OpenAPI Specifications for the Binance Spot WebSocket API * * API documents: * - [Github web-socket-api documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-api.md) * - [General API information for web-socket-api on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/general-api-information) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_api::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UserDataStreamUnsubscribeResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option, } impl UserDataStreamUnsubscribeResponse { #[must_use] pub fn new() -> UserDataStreamUnsubscribeResponse { UserDataStreamUnsubscribeResponse { id: None, status: None, result: None, } } } src/spot/websocket_streams/apis/mod.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod web_socket_streams_api; pub use web_socket_streams_api::*; src/spot/websocket_streams/handle.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ use crate::{common::config::ConfigurationWebsocketStreams, models::WebsocketStreamsConnectConfig}; use super::WebsocketStreams; #[derive(Clone)] pub struct WebsocketStreamsHandle { configuration: ConfigurationWebsocketStreams, } impl WebsocketStreamsHandle { #[must_use] pub fn new(configuration: ConfigurationWebsocketStreams) -> Self { Self { configuration } } /// Connects to a WebSocket stream using default configuration. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let streams = handle.connect().await?; /// pub async fn connect(&self) -> anyhow::Result { self.connect_with_config(Default::default()).await } /// Connects to a WebSocket stream with a custom configuration. /// /// # Arguments /// /// * `cfg` - A configuration object specifying connection details for the WebSocket stream. /// /// # Returns /// /// A `Result` containing a `WebsocketStreams` instance if the connection is successful, /// or an error if the connection fails. /// /// # Errors /// /// Returns an [`anyhow::Error`] if the connection fails. /// /// # Examples /// /// /// let handle = `WebsocketStreamsHandle::new(configuration)`; /// let `custom_config` = `WebsocketStreamsConnectConfig::default()`; /// let streams = `handle.connect_with_config(custom_config).await`?; /// pub async fn connect_with_config( &self, cfg: WebsocketStreamsConnectConfig, ) -> anyhow::Result { WebsocketStreams::connect(self.configuration.clone(), cfg.streams, cfg.mode).await } } src/spot/websocket_streams/models/agg_trade_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AggTradeResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, #[serde(rename = "M", skip_serializing_if = "Option::is_none")] pub m_uppercase: Option, } impl AggTradeResponse { #[must_use] pub fn new() -> AggTradeResponse { AggTradeResponse { e: None, e_uppercase: None, s: None, a: None, p: None, q: None, f: None, l: None, t_uppercase: None, m: None, m_uppercase: None, } } } src/spot/websocket_streams/models/all_market_rolling_window_ticker_response_inner.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMarketRollingWindowTickerResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub w: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "F", skip_serializing_if = "Option::is_none")] pub f_uppercase: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, } impl AllMarketRollingWindowTickerResponseInner { #[must_use] pub fn new() -> AllMarketRollingWindowTickerResponseInner { AllMarketRollingWindowTickerResponseInner { e: None, e_uppercase: None, s: None, p: None, p_uppercase: None, o: None, h: None, l: None, c: None, w: None, v: None, q: None, o_uppercase: None, c_uppercase: None, f_uppercase: None, l_uppercase: None, n: None, } } } src/spot/websocket_streams/models/all_mini_ticker_response_inner.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMiniTickerResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, } impl AllMiniTickerResponseInner { #[must_use] pub fn new() -> AllMiniTickerResponseInner { AllMiniTickerResponseInner { e: None, e_uppercase: None, s: None, c: None, o: None, h: None, l: None, v: None, q: None, } } } src/spot/websocket_streams/models/all_ticker_response_inner.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllTickerResponseInner { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub w: Option, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "A", skip_serializing_if = "Option::is_none")] pub a_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "F", skip_serializing_if = "Option::is_none")] pub f_uppercase: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, } impl AllTickerResponseInner { #[must_use] pub fn new() -> AllTickerResponseInner { AllTickerResponseInner { e: None, e_uppercase: None, s: None, p: None, p_uppercase: None, w: None, x: None, c: None, q_uppercase: None, b: None, b_uppercase: None, a: None, a_uppercase: None, o: None, h: None, l: None, v: None, q: None, o_uppercase: None, c_uppercase: None, f_uppercase: None, l_uppercase: None, n: None, } } } src/spot/websocket_streams/models/asset_filters.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(try_from = "Value")] pub enum AssetFilters { #[serde(rename = "MAX_ASSET")] MaxAsset(Box), Other(serde_json::Value), } impl Default for AssetFilters { fn default() -> Self { Self::MaxAsset(Default::default()) } } impl TryFrom for AssetFilters { type Error = serde_json::Error; fn try_from(v: Value) -> Result { let tag = v .get("filterType") .and_then(Value::as_str) .ok_or_else(|| serde_json::Error::custom("missing field `filterType`"))?; match tag { "MAX_ASSET" => { let payload = serde_json::from_value(v)?; Ok(AssetFilters::MaxAsset(Box::new(payload))) } _ => Ok(AssetFilters::Other(v)), } } } src/spot/websocket_streams/models/avg_price_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AvgPriceResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub w: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, } impl AvgPriceResponse { #[must_use] pub fn new() -> AvgPriceResponse { AvgPriceResponse { e: None, e_uppercase: None, s: None, i: None, w: None, t_uppercase: None, } } } src/spot/websocket_streams/models/book_ticker_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct BookTickerResponse { #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "A", skip_serializing_if = "Option::is_none")] pub a_uppercase: Option, } impl BookTickerResponse { #[must_use] pub fn new() -> BookTickerResponse { BookTickerResponse { u: None, s: None, b: None, b_uppercase: None, a: None, a_uppercase: None, } } } src/spot/websocket_streams/models/diff_book_depth_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DiffBookDepthResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "U", skip_serializing_if = "Option::is_none")] pub u_uppercase: Option, #[serde(rename = "u", skip_serializing_if = "Option::is_none")] pub u: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option>>, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option>>, } impl DiffBookDepthResponse { #[must_use] pub fn new() -> DiffBookDepthResponse { DiffBookDepthResponse { e: None, e_uppercase: None, s: None, u_uppercase: None, u: None, b: None, a: None, } } } src/spot/websocket_streams/models/exchange_filters.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(try_from = "Value")] pub enum ExchangeFilters { #[serde(rename = "EXCHANGE_MAX_NUM_ORDERS")] ExchangeMaxNumOrders(Box), #[serde(rename = "EXCHANGE_MAX_NUM_ALGO_ORDERS")] ExchangeMaxNumAlgoOrders(Box), #[serde(rename = "EXCHANGE_MAX_NUM_ICEBERG_ORDERS")] ExchangeMaxNumIcebergOrders(Box), #[serde(rename = "EXCHANGE_MAX_NUM_ORDER_LISTS")] ExchangeMaxNumOrderLists(Box), Other(serde_json::Value), } impl Default for ExchangeFilters { fn default() -> Self { Self::ExchangeMaxNumOrders(Default::default()) } } impl TryFrom for ExchangeFilters { type Error = serde_json::Error; fn try_from(v: Value) -> Result { let tag = v .get("filterType") .and_then(Value::as_str) .ok_or_else(|| serde_json::Error::custom("missing field `filterType`"))?; match tag { "EXCHANGE_MAX_NUM_ORDERS" => { let payload = serde_json::from_value(v)?; Ok(ExchangeFilters::ExchangeMaxNumOrders(Box::new(payload))) } "EXCHANGE_MAX_NUM_ALGO_ORDERS" => { let payload = serde_json::from_value(v)?; Ok(ExchangeFilters::ExchangeMaxNumAlgoOrders(Box::new(payload))) } "EXCHANGE_MAX_NUM_ICEBERG_ORDERS" => { let payload = serde_json::from_value(v)?; Ok(ExchangeFilters::ExchangeMaxNumIcebergOrders(Box::new( payload, ))) } "EXCHANGE_MAX_NUM_ORDER_LISTS" => { let payload = serde_json::from_value(v)?; Ok(ExchangeFilters::ExchangeMaxNumOrderLists(Box::new(payload))) } _ => Ok(ExchangeFilters::Other(v)), } } } src/spot/websocket_streams/models/exchange_max_num_algo_orders_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumAlgoOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumAlgoOrders", skip_serializing_if = "Option::is_none")] pub max_num_algo_orders: Option, } impl ExchangeMaxNumAlgoOrdersFilter { #[must_use] pub fn new() -> ExchangeMaxNumAlgoOrdersFilter { ExchangeMaxNumAlgoOrdersFilter { filter_type: None, max_num_algo_orders: None, } } } src/spot/websocket_streams/models/exchange_max_num_iceberg_orders_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumIcebergOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde( rename = "maxNumIcebergOrders", skip_serializing_if = "Option::is_none" )] pub max_num_iceberg_orders: Option, } impl ExchangeMaxNumIcebergOrdersFilter { #[must_use] pub fn new() -> ExchangeMaxNumIcebergOrdersFilter { ExchangeMaxNumIcebergOrdersFilter { filter_type: None, max_num_iceberg_orders: None, } } } src/spot/websocket_streams/models/exchange_max_num_order_lists_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumOrderListsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrderLists", skip_serializing_if = "Option::is_none")] pub max_num_order_lists: Option, } impl ExchangeMaxNumOrderListsFilter { #[must_use] pub fn new() -> ExchangeMaxNumOrderListsFilter { ExchangeMaxNumOrderListsFilter { filter_type: None, max_num_order_lists: None, } } } src/spot/websocket_streams/models/exchange_max_num_orders_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ExchangeMaxNumOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrders", skip_serializing_if = "Option::is_none")] pub max_num_orders: Option, } impl ExchangeMaxNumOrdersFilter { #[must_use] pub fn new() -> ExchangeMaxNumOrdersFilter { ExchangeMaxNumOrdersFilter { filter_type: None, max_num_orders: None, } } } src/spot/websocket_streams/models/iceberg_parts_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct IcebergPartsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, } impl IcebergPartsFilter { #[must_use] pub fn new() -> IcebergPartsFilter { IcebergPartsFilter { filter_type: None, limit: None, } } } src/spot/websocket_streams/models/kline_offset_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlineOffsetResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "k", skip_serializing_if = "Option::is_none")] pub k: Option>, } impl KlineOffsetResponse { #[must_use] pub fn new() -> KlineOffsetResponse { KlineOffsetResponse { e: None, e_uppercase: None, s: None, k: None, } } } src/spot/websocket_streams/models/kline_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlineResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "k", skip_serializing_if = "Option::is_none")] pub k: Option>, } impl KlineResponse { #[must_use] pub fn new() -> KlineResponse { KlineResponse { e: None, e_uppercase: None, s: None, k: None, } } } src/spot/websocket_streams/models/kline_response_k.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct KlineResponseK { #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "i", skip_serializing_if = "Option::is_none")] pub i: Option, #[serde(rename = "f", skip_serializing_if = "Option::is_none")] pub f: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "V", skip_serializing_if = "Option::is_none")] pub v_uppercase: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, } impl KlineResponseK { #[must_use] pub fn new() -> KlineResponseK { KlineResponseK { t: None, t_uppercase: None, s: None, i: None, f: None, l_uppercase: None, o: None, c: None, h: None, l: None, v: None, n: None, x: None, q: None, v_uppercase: None, q_uppercase: None, b_uppercase: None, } } } src/spot/websocket_streams/models/lot_size_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct LotSizeFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "minQty", skip_serializing_if = "Option::is_none")] pub min_qty: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "stepSize", skip_serializing_if = "Option::is_none")] pub step_size: Option, } impl LotSizeFilter { #[must_use] pub fn new() -> LotSizeFilter { LotSizeFilter { filter_type: None, qty_exponent: None, min_qty: None, max_qty: None, step_size: None, } } } src/spot/websocket_streams/models/market_lot_size_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarketLotSizeFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "minQty", skip_serializing_if = "Option::is_none")] pub min_qty: Option, #[serde(rename = "maxQty", skip_serializing_if = "Option::is_none")] pub max_qty: Option, #[serde(rename = "stepSize", skip_serializing_if = "Option::is_none")] pub step_size: Option, } impl MarketLotSizeFilter { #[must_use] pub fn new() -> MarketLotSizeFilter { MarketLotSizeFilter { filter_type: None, qty_exponent: None, min_qty: None, max_qty: None, step_size: None, } } } src/spot/websocket_streams/models/max_asset_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxAssetFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, } impl MaxAssetFilter { #[must_use] pub fn new() -> MaxAssetFilter { MaxAssetFilter { filter_type: None, qty_exponent: None, limit: None, asset: None, } } } src/spot/websocket_streams/models/max_num_algo_orders_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumAlgoOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumAlgoOrders", skip_serializing_if = "Option::is_none")] pub max_num_algo_orders: Option, } impl MaxNumAlgoOrdersFilter { #[must_use] pub fn new() -> MaxNumAlgoOrdersFilter { MaxNumAlgoOrdersFilter { filter_type: None, max_num_algo_orders: None, } } } src/spot/websocket_streams/models/max_num_iceberg_orders_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumIcebergOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde( rename = "maxNumIcebergOrders", skip_serializing_if = "Option::is_none" )] pub max_num_iceberg_orders: Option, } impl MaxNumIcebergOrdersFilter { #[must_use] pub fn new() -> MaxNumIcebergOrdersFilter { MaxNumIcebergOrdersFilter { filter_type: None, max_num_iceberg_orders: None, } } } src/spot/websocket_streams/models/max_num_order_amends_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumOrderAmendsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrderAmends", skip_serializing_if = "Option::is_none")] pub max_num_order_amends: Option, } impl MaxNumOrderAmendsFilter { #[must_use] pub fn new() -> MaxNumOrderAmendsFilter { MaxNumOrderAmendsFilter { filter_type: None, max_num_order_amends: None, } } } src/spot/websocket_streams/models/max_num_order_lists_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumOrderListsFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrderLists", skip_serializing_if = "Option::is_none")] pub max_num_order_lists: Option, } impl MaxNumOrderListsFilter { #[must_use] pub fn new() -> MaxNumOrderListsFilter { MaxNumOrderListsFilter { filter_type: None, max_num_order_lists: None, } } } src/spot/websocket_streams/models/max_num_orders_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxNumOrdersFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "maxNumOrders", skip_serializing_if = "Option::is_none")] pub max_num_orders: Option, } impl MaxNumOrdersFilter { #[must_use] pub fn new() -> MaxNumOrdersFilter { MaxNumOrdersFilter { filter_type: None, max_num_orders: None, } } } src/spot/websocket_streams/models/max_position_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MaxPositionFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "qtyExponent", skip_serializing_if = "Option::is_none")] pub qty_exponent: Option, #[serde(rename = "maxPosition", skip_serializing_if = "Option::is_none")] pub max_position: Option, } impl MaxPositionFilter { #[must_use] pub fn new() -> MaxPositionFilter { MaxPositionFilter { filter_type: None, qty_exponent: None, max_position: None, } } } src/spot/websocket_streams/models/min_notional_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MinNotionalFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "priceExponent", skip_serializing_if = "Option::is_none")] pub price_exponent: Option, #[serde(rename = "minNotional", skip_serializing_if = "Option::is_none")] pub min_notional: Option, #[serde(rename = "applyToMarket", skip_serializing_if = "Option::is_none")] pub apply_to_market: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl MinNotionalFilter { #[must_use] pub fn new() -> MinNotionalFilter { MinNotionalFilter { filter_type: None, price_exponent: None, min_notional: None, apply_to_market: None, avg_price_mins: None, } } } src/spot/websocket_streams/models/mini_ticker_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MiniTickerResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, } impl MiniTickerResponse { #[must_use] pub fn new() -> MiniTickerResponse { MiniTickerResponse { e: None, e_uppercase: None, s: None, c: None, o: None, h: None, l: None, v: None, q: None, } } } src/spot/websocket_streams/models/notional_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct NotionalFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "priceExponent", skip_serializing_if = "Option::is_none")] pub price_exponent: Option, #[serde(rename = "minNotional", skip_serializing_if = "Option::is_none")] pub min_notional: Option, #[serde(rename = "applyMinToMarket", skip_serializing_if = "Option::is_none")] pub apply_min_to_market: Option, #[serde(rename = "maxNotional", skip_serializing_if = "Option::is_none")] pub max_notional: Option, #[serde(rename = "applyMaxToMarket", skip_serializing_if = "Option::is_none")] pub apply_max_to_market: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl NotionalFilter { #[must_use] pub fn new() -> NotionalFilter { NotionalFilter { filter_type: None, price_exponent: None, min_notional: None, apply_min_to_market: None, max_notional: None, apply_max_to_market: None, avg_price_mins: None, } } } src/spot/websocket_streams/models/partial_book_depth_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PartialBookDepthResponse { #[serde(rename = "lastUpdateId", skip_serializing_if = "Option::is_none")] pub last_update_id: Option, #[serde(rename = "bids", skip_serializing_if = "Option::is_none")] pub bids: Option>>, #[serde(rename = "asks", skip_serializing_if = "Option::is_none")] pub asks: Option>>, } impl PartialBookDepthResponse { #[must_use] pub fn new() -> PartialBookDepthResponse { PartialBookDepthResponse { last_update_id: None, bids: None, asks: None, } } } src/spot/websocket_streams/models/percent_price_by_side_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PercentPriceBySideFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "multiplierExponent", skip_serializing_if = "Option::is_none")] pub multiplier_exponent: Option, #[serde(rename = "bidMultiplierUp", skip_serializing_if = "Option::is_none")] pub bid_multiplier_up: Option, #[serde(rename = "bidMultiplierDown", skip_serializing_if = "Option::is_none")] pub bid_multiplier_down: Option, #[serde(rename = "askMultiplierUp", skip_serializing_if = "Option::is_none")] pub ask_multiplier_up: Option, #[serde(rename = "askMultiplierDown", skip_serializing_if = "Option::is_none")] pub ask_multiplier_down: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl PercentPriceBySideFilter { #[must_use] pub fn new() -> PercentPriceBySideFilter { PercentPriceBySideFilter { filter_type: None, multiplier_exponent: None, bid_multiplier_up: None, bid_multiplier_down: None, ask_multiplier_up: None, ask_multiplier_down: None, avg_price_mins: None, } } } src/spot/websocket_streams/models/percent_price_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PercentPriceFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "multiplierExponent", skip_serializing_if = "Option::is_none")] pub multiplier_exponent: Option, #[serde(rename = "multiplierUp", skip_serializing_if = "Option::is_none")] pub multiplier_up: Option, #[serde(rename = "multiplierDown", skip_serializing_if = "Option::is_none")] pub multiplier_down: Option, #[serde(rename = "avgPriceMins", skip_serializing_if = "Option::is_none")] pub avg_price_mins: Option, } impl PercentPriceFilter { #[must_use] pub fn new() -> PercentPriceFilter { PercentPriceFilter { filter_type: None, multiplier_exponent: None, multiplier_up: None, multiplier_down: None, avg_price_mins: None, } } } src/spot/websocket_streams/models/price_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PriceFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "priceExponent", skip_serializing_if = "Option::is_none")] pub price_exponent: Option, #[serde(rename = "minPrice", skip_serializing_if = "Option::is_none")] pub min_price: Option, #[serde(rename = "maxPrice", skip_serializing_if = "Option::is_none")] pub max_price: Option, #[serde(rename = "tickSize", skip_serializing_if = "Option::is_none")] pub tick_size: Option, } impl PriceFilter { #[must_use] pub fn new() -> PriceFilter { PriceFilter { filter_type: None, price_exponent: None, min_price: None, max_price: None, tick_size: None, } } } src/spot/websocket_streams/models/rate_limits.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RateLimits { #[serde(rename = "rateLimitType", skip_serializing_if = "Option::is_none")] pub rate_limit_type: Option, #[serde(rename = "interval", skip_serializing_if = "Option::is_none")] pub interval: Option, #[serde(rename = "intervalNum", skip_serializing_if = "Option::is_none")] pub interval_num: Option, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl RateLimits { #[must_use] pub fn new() -> RateLimits { RateLimits { rate_limit_type: None, interval: None, interval_num: None, limit: None, count: None, } } } src/spot/websocket_streams/models/rolling_window_ticker_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RollingWindowTickerResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub w: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "F", skip_serializing_if = "Option::is_none")] pub f_uppercase: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, } impl RollingWindowTickerResponse { #[must_use] pub fn new() -> RollingWindowTickerResponse { RollingWindowTickerResponse { e: None, e_uppercase: None, s: None, p: None, p_uppercase: None, o: None, h: None, l: None, c: None, w: None, v: None, q: None, o_uppercase: None, c_uppercase: None, f_uppercase: None, l_uppercase: None, n: None, } } } src/spot/websocket_streams/models/t_plus_sell_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TPlusSellFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")] pub end_time: Option, } impl TPlusSellFilter { #[must_use] pub fn new() -> TPlusSellFilter { TPlusSellFilter { filter_type: None, end_time: None, } } } src/spot/websocket_streams/models/ticker_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TickerResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "P", skip_serializing_if = "Option::is_none")] pub p_uppercase: Option, #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub w: Option, #[serde(rename = "x", skip_serializing_if = "Option::is_none")] pub x: Option, #[serde(rename = "c", skip_serializing_if = "Option::is_none")] pub c: Option, #[serde(rename = "Q", skip_serializing_if = "Option::is_none")] pub q_uppercase: Option, #[serde(rename = "b", skip_serializing_if = "Option::is_none")] pub b: Option, #[serde(rename = "B", skip_serializing_if = "Option::is_none")] pub b_uppercase: Option, #[serde(rename = "a", skip_serializing_if = "Option::is_none")] pub a: Option, #[serde(rename = "A", skip_serializing_if = "Option::is_none")] pub a_uppercase: Option, #[serde(rename = "o", skip_serializing_if = "Option::is_none")] pub o: Option, #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub h: Option, #[serde(rename = "l", skip_serializing_if = "Option::is_none")] pub l: Option, #[serde(rename = "v", skip_serializing_if = "Option::is_none")] pub v: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "O", skip_serializing_if = "Option::is_none")] pub o_uppercase: Option, #[serde(rename = "C", skip_serializing_if = "Option::is_none")] pub c_uppercase: Option, #[serde(rename = "F", skip_serializing_if = "Option::is_none")] pub f_uppercase: Option, #[serde(rename = "L", skip_serializing_if = "Option::is_none")] pub l_uppercase: Option, #[serde(rename = "n", skip_serializing_if = "Option::is_none")] pub n: Option, } impl TickerResponse { #[must_use] pub fn new() -> TickerResponse { TickerResponse { e: None, e_uppercase: None, s: None, p: None, p_uppercase: None, w: None, x: None, c: None, q_uppercase: None, b: None, b_uppercase: None, a: None, a_uppercase: None, o: None, h: None, l: None, v: None, q: None, o_uppercase: None, c_uppercase: None, f_uppercase: None, l_uppercase: None, n: None, } } } src/spot/websocket_streams/models/trade_response.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TradeResponse { #[serde(rename = "e", skip_serializing_if = "Option::is_none")] pub e: Option, #[serde(rename = "E", skip_serializing_if = "Option::is_none")] pub e_uppercase: Option, #[serde(rename = "s", skip_serializing_if = "Option::is_none")] pub s: Option, #[serde(rename = "t", skip_serializing_if = "Option::is_none")] pub t: Option, #[serde(rename = "p", skip_serializing_if = "Option::is_none")] pub p: Option, #[serde(rename = "q", skip_serializing_if = "Option::is_none")] pub q: Option, #[serde(rename = "T", skip_serializing_if = "Option::is_none")] pub t_uppercase: Option, #[serde(rename = "m", skip_serializing_if = "Option::is_none")] pub m: Option, #[serde(rename = "M", skip_serializing_if = "Option::is_none")] pub m_uppercase: Option, } impl TradeResponse { #[must_use] pub fn new() -> TradeResponse { TradeResponse { e: None, e_uppercase: None, s: None, t: None, p: None, q: None, t_uppercase: None, m: None, m_uppercase: None, } } } src/spot/websocket_streams/models/trailing_delta_filter.rs /* * Binance Spot WebSocket Streams * * OpenAPI Specifications for the Binance Spot WebSocket Streams * * API documents: * - [Github web-socket-streams documentation file](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md) * - [General API information for web-socket-streams on website](https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams) * * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::spot::websocket_streams::models; use serde::{Deserialize, Deserializer, Serialize, de::Error}; use serde_json::Value; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TrailingDeltaFilter { #[serde(rename = "filterType", skip_serializing_if = "Option::is_none")] pub filter_type: Option, #[serde( rename = "minTrailingAboveDelta", skip_serializing_if = "Option::is_none" )] pub min_trailing_above_delta: Option, #[serde( rename = "maxTrailingAboveDelta", skip_serializing_if = "Option::is_none" )] pub max_trailing_above_delta: Option, #[serde( rename = "minTrailingBelowDelta", skip_serializing_if = "Option::is_none" )] pub min_trailing_below_delta: Option, #[serde( rename = "maxTrailingBelowDelta", skip_serializing_if = "Option::is_none" )] pub max_trailing_below_delta: Option, } impl TrailingDeltaFilter { #[must_use] pub fn new() -> TrailingDeltaFilter { TrailingDeltaFilter { filter_type: None, min_trailing_above_delta: None, max_trailing_above_delta: None, min_trailing_below_delta: None, max_trailing_below_delta: None, } } } src/staking/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::staking; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = staking::StakingRestApi::production(configuration); let params = staking::rest_api::ClaimBoostRewardsParams::default(); let response = client.claim_boost_rewards(params).await?; ``` src/staking/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::staking; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = staking::StakingRestApi::production(configuration); let params = staking::rest_api::ClaimBoostRewardsParams::default(); let response = client.claim_boost_rewards(params).await?; ``` src/staking/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::staking; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = staking::StakingRestApi::production(configuration); let params = staking::rest_api::ClaimBoostRewardsParams::default(); match client.claim_boost_rewards(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/staking/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::staking; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = staking::StakingRestApi::production(configuration); let params = staking::rest_api::ClaimBoostRewardsParams::default(); let response = client.claim_boost_rewards(params).await?; ``` src/staking/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::staking; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = staking::StakingRestApi::production(configuration); let params = staking::rest_api::ClaimBoostRewardsParams::default(); let response = client.claim_boost_rewards(params).await?; ``` src/staking/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::staking; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = staking::StakingRestApi::production(configuration); let params = staking::rest_api::ClaimBoostRewardsParams::default(); let response = client.claim_boost_rewards(params).await?; ``` src/staking/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::staking; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = staking::StakingRestApi::production(configuration); let params = staking::rest_api::ClaimBoostRewardsParams::default(); let response = client.claim_boost_rewards(params).await?; ``` src/staking/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::staking; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = staking::StakingRestApi::production(configuration); let params = staking::rest_api::ClaimBoostRewardsParams::default(); let response = client.claim_boost_rewards(params).await?; ``` src/staking/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::staking; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = staking::StakingRestApi::production(configuration); let params = staking::rest_api::ClaimBoostRewardsParams::default(); let response = client.claim_boost_rewards(params).await?; ``` src/staking/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::STAKING_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the Staking REST API client for interacting with the Binance Staking REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct StakingRestApi {} impl StakingRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production Staking REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("staking"); if config.base_path.is_none() { config.base_path = Some(STAKING_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(STAKING_REST_API_PROD_URL.to_string()); StakingRestApi::from_config(config) } } src/staking/rest_api/apis/mod.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod eth_staking_api; pub use eth_staking_api::*; pub mod on_chain_yields_api; pub use on_chain_yields_api::*; pub mod soft_staking_api; pub use soft_staking_api::*; pub mod sol_staking_api; pub use sol_staking_api::*; src/staking/rest_api/models/claim_boost_rewards_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ClaimBoostRewardsResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl ClaimBoostRewardsResponse { #[must_use] pub fn new() -> ClaimBoostRewardsResponse { ClaimBoostRewardsResponse { success: None } } } src/staking/rest_api/models/eth_staking_account_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EthStakingAccountResponse { #[serde(rename = "holdingInETH", skip_serializing_if = "Option::is_none")] pub holding_in_eth: Option, #[serde(rename = "holdings", skip_serializing_if = "Option::is_none")] pub holdings: Option>, #[serde( rename = "thirtyDaysProfitInETH", skip_serializing_if = "Option::is_none" )] pub thirty_days_profit_in_eth: Option, #[serde(rename = "profit", skip_serializing_if = "Option::is_none")] pub profit: Option>, } impl EthStakingAccountResponse { #[must_use] pub fn new() -> EthStakingAccountResponse { EthStakingAccountResponse { holding_in_eth: None, holdings: None, thirty_days_profit_in_eth: None, profit: None, } } } src/staking/rest_api/models/eth_staking_account_response_holdings.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EthStakingAccountResponseHoldings { #[serde(rename = "wbethAmount", skip_serializing_if = "Option::is_none")] pub wbeth_amount: Option, #[serde(rename = "bethAmount", skip_serializing_if = "Option::is_none")] pub beth_amount: Option, } impl EthStakingAccountResponseHoldings { #[must_use] pub fn new() -> EthStakingAccountResponseHoldings { EthStakingAccountResponseHoldings { wbeth_amount: None, beth_amount: None, } } } src/staking/rest_api/models/eth_staking_account_response_profit.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EthStakingAccountResponseProfit { #[serde(rename = "amountFromWBETH", skip_serializing_if = "Option::is_none")] pub amount_from_wbeth: Option, #[serde(rename = "amountFromBETH", skip_serializing_if = "Option::is_none")] pub amount_from_beth: Option, } impl EthStakingAccountResponseProfit { #[must_use] pub fn new() -> EthStakingAccountResponseProfit { EthStakingAccountResponseProfit { amount_from_wbeth: None, amount_from_beth: None, } } } src/staking/rest_api/models/get_bnsol_rate_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBnsolRateHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetBnsolRateHistoryResponse { #[must_use] pub fn new() -> GetBnsolRateHistoryResponse { GetBnsolRateHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_bnsol_rate_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBnsolRateHistoryResponseRowsInner { #[serde( rename = "annualPercentageRate", skip_serializing_if = "Option::is_none" )] pub annual_percentage_rate: Option, #[serde(rename = "exchangeRate", skip_serializing_if = "Option::is_none")] pub exchange_rate: Option, #[serde(rename = "boostRewards", skip_serializing_if = "Option::is_none")] pub boost_rewards: Option>, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl GetBnsolRateHistoryResponseRowsInner { #[must_use] pub fn new() -> GetBnsolRateHistoryResponseRowsInner { GetBnsolRateHistoryResponseRowsInner { annual_percentage_rate: None, exchange_rate: None, boost_rewards: None, time: None, } } } src/staking/rest_api/models/get_bnsol_rate_history_response_rows_inner_boost_rewards_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBnsolRateHistoryResponseRowsInnerBoostRewardsInner { #[serde(rename = "boostAPR", skip_serializing_if = "Option::is_none")] pub boost_apr: Option, #[serde(rename = "rewardsAsset", skip_serializing_if = "Option::is_none")] pub rewards_asset: Option, } impl GetBnsolRateHistoryResponseRowsInnerBoostRewardsInner { #[must_use] pub fn new() -> GetBnsolRateHistoryResponseRowsInnerBoostRewardsInner { GetBnsolRateHistoryResponseRowsInnerBoostRewardsInner { boost_apr: None, rewards_asset: None, } } } src/staking/rest_api/models/get_bnsol_rewards_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBnsolRewardsHistoryResponse { #[serde(rename = "estRewardsInSOL", skip_serializing_if = "Option::is_none")] pub est_rewards_in_sol: Option, #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetBnsolRewardsHistoryResponse { #[must_use] pub fn new() -> GetBnsolRewardsHistoryResponse { GetBnsolRewardsHistoryResponse { est_rewards_in_sol: None, rows: None, total: None, } } } src/staking/rest_api/models/get_bnsol_rewards_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBnsolRewardsHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "amountInSOL", skip_serializing_if = "Option::is_none")] pub amount_in_sol: Option, #[serde(rename = "holding", skip_serializing_if = "Option::is_none")] pub holding: Option, #[serde(rename = "holdingInSOL", skip_serializing_if = "Option::is_none")] pub holding_in_sol: Option, #[serde( rename = "annualPercentageRate", skip_serializing_if = "Option::is_none" )] pub annual_percentage_rate: Option, } impl GetBnsolRewardsHistoryResponseRowsInner { #[must_use] pub fn new() -> GetBnsolRewardsHistoryResponseRowsInner { GetBnsolRewardsHistoryResponseRowsInner { time: None, amount_in_sol: None, holding: None, holding_in_sol: None, annual_percentage_rate: None, } } } src/staking/rest_api/models/get_boost_rewards_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBoostRewardsHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetBoostRewardsHistoryResponse { #[must_use] pub fn new() -> GetBoostRewardsHistoryResponse { GetBoostRewardsHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_boost_rewards_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBoostRewardsHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "token", skip_serializing_if = "Option::is_none")] pub token: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "bnsolHolding", skip_serializing_if = "Option::is_none")] pub bnsol_holding: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetBoostRewardsHistoryResponseRowsInner { #[must_use] pub fn new() -> GetBoostRewardsHistoryResponseRowsInner { GetBoostRewardsHistoryResponseRowsInner { time: None, token: None, amount: None, bnsol_holding: None, status: None, } } } src/staking/rest_api/models/get_current_eth_staking_quota_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCurrentEthStakingQuotaResponse { #[serde( rename = "leftStakingPersonalQuota", skip_serializing_if = "Option::is_none" )] pub left_staking_personal_quota: Option, #[serde( rename = "leftRedemptionPersonalQuota", skip_serializing_if = "Option::is_none" )] pub left_redemption_personal_quota: Option, #[serde(rename = "minStakeAmount", skip_serializing_if = "Option::is_none")] pub min_stake_amount: Option, #[serde(rename = "minRedeemAmount", skip_serializing_if = "Option::is_none")] pub min_redeem_amount: Option, #[serde(rename = "redeemPeriod", skip_serializing_if = "Option::is_none")] pub redeem_period: Option, #[serde(rename = "stakeable", skip_serializing_if = "Option::is_none")] pub stakeable: Option, #[serde(rename = "redeemable", skip_serializing_if = "Option::is_none")] pub redeemable: Option, #[serde(rename = "commissionFee", skip_serializing_if = "Option::is_none")] pub commission_fee: Option, #[serde(rename = "calculating", skip_serializing_if = "Option::is_none")] pub calculating: Option, } impl GetCurrentEthStakingQuotaResponse { #[must_use] pub fn new() -> GetCurrentEthStakingQuotaResponse { GetCurrentEthStakingQuotaResponse { left_staking_personal_quota: None, left_redemption_personal_quota: None, min_stake_amount: None, min_redeem_amount: None, redeem_period: None, stakeable: None, redeemable: None, commission_fee: None, calculating: None, } } } src/staking/rest_api/models/get_eth_redemption_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetEthRedemptionHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetEthRedemptionHistoryResponse { #[must_use] pub fn new() -> GetEthRedemptionHistoryResponse { GetEthRedemptionHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_eth_redemption_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetEthRedemptionHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "arrivalTime", skip_serializing_if = "Option::is_none")] pub arrival_time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "distributeAsset", skip_serializing_if = "Option::is_none")] pub distribute_asset: Option, #[serde(rename = "distributeAmount", skip_serializing_if = "Option::is_none")] pub distribute_amount: Option, #[serde(rename = "conversionRatio", skip_serializing_if = "Option::is_none")] pub conversion_ratio: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetEthRedemptionHistoryResponseRowsInner { #[must_use] pub fn new() -> GetEthRedemptionHistoryResponseRowsInner { GetEthRedemptionHistoryResponseRowsInner { time: None, arrival_time: None, asset: None, amount: None, distribute_asset: None, distribute_amount: None, conversion_ratio: None, status: None, } } } src/staking/rest_api/models/get_eth_staking_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetEthStakingHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetEthStakingHistoryResponse { #[must_use] pub fn new() -> GetEthStakingHistoryResponse { GetEthStakingHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_eth_staking_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetEthStakingHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "distributeAsset", skip_serializing_if = "Option::is_none")] pub distribute_asset: Option, #[serde(rename = "distributeAmount", skip_serializing_if = "Option::is_none")] pub distribute_amount: Option, #[serde(rename = "conversionRatio", skip_serializing_if = "Option::is_none")] pub conversion_ratio: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetEthStakingHistoryResponseRowsInner { #[must_use] pub fn new() -> GetEthStakingHistoryResponseRowsInner { GetEthStakingHistoryResponseRowsInner { time: None, asset: None, amount: None, distribute_asset: None, distribute_amount: None, conversion_ratio: None, status: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_personal_left_quota_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedPersonalLeftQuotaResponse { #[serde(rename = "leftPersonalQuota", skip_serializing_if = "Option::is_none")] pub left_personal_quota: Option, } impl GetOnChainYieldsLockedPersonalLeftQuotaResponse { #[must_use] pub fn new() -> GetOnChainYieldsLockedPersonalLeftQuotaResponse { GetOnChainYieldsLockedPersonalLeftQuotaResponse { left_personal_quota: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_product_list_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedProductListResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetOnChainYieldsLockedProductListResponse { #[must_use] pub fn new() -> GetOnChainYieldsLockedProductListResponse { GetOnChainYieldsLockedProductListResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_product_list_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedProductListResponseRowsInner { #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")] pub project_id: Option, #[serde(rename = "detail", skip_serializing_if = "Option::is_none")] pub detail: Option>, #[serde(rename = "quota", skip_serializing_if = "Option::is_none")] pub quota: Option>, } impl GetOnChainYieldsLockedProductListResponseRowsInner { #[must_use] pub fn new() -> GetOnChainYieldsLockedProductListResponseRowsInner { GetOnChainYieldsLockedProductListResponseRowsInner { project_id: None, detail: None, quota: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_product_list_response_rows_inner_detail.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedProductListResponseRowsInnerDetail { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "rewardAsset", skip_serializing_if = "Option::is_none")] pub reward_asset: Option, #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] pub duration: Option, #[serde(rename = "renewable", skip_serializing_if = "Option::is_none")] pub renewable: Option, #[serde(rename = "isSoldOut", skip_serializing_if = "Option::is_none")] pub is_sold_out: Option, #[serde(rename = "apr", skip_serializing_if = "Option::is_none")] pub apr: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde( rename = "subscriptionStartTime", skip_serializing_if = "Option::is_none" )] pub subscription_start_time: Option, #[serde(rename = "canRedeemToFlex", skip_serializing_if = "Option::is_none")] pub can_redeem_to_flex: Option, } impl GetOnChainYieldsLockedProductListResponseRowsInnerDetail { #[must_use] pub fn new() -> GetOnChainYieldsLockedProductListResponseRowsInnerDetail { GetOnChainYieldsLockedProductListResponseRowsInnerDetail { asset: None, reward_asset: None, duration: None, renewable: None, is_sold_out: None, apr: None, status: None, subscription_start_time: None, can_redeem_to_flex: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_product_list_response_rows_inner_quota.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedProductListResponseRowsInnerQuota { #[serde(rename = "totalPersonalQuota", skip_serializing_if = "Option::is_none")] pub total_personal_quota: Option, #[serde(rename = "minimum", skip_serializing_if = "Option::is_none")] pub minimum: Option, } impl GetOnChainYieldsLockedProductListResponseRowsInnerQuota { #[must_use] pub fn new() -> GetOnChainYieldsLockedProductListResponseRowsInnerQuota { GetOnChainYieldsLockedProductListResponseRowsInnerQuota { total_personal_quota: None, minimum: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_product_position_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedProductPositionResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetOnChainYieldsLockedProductPositionResponse { #[must_use] pub fn new() -> GetOnChainYieldsLockedProductPositionResponse { GetOnChainYieldsLockedProductPositionResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_redemption_record_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedRedemptionRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetOnChainYieldsLockedRedemptionRecordResponse { #[must_use] pub fn new() -> GetOnChainYieldsLockedRedemptionRecordResponse { GetOnChainYieldsLockedRedemptionRecordResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_redemption_record_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedRedemptionRecordResponseRowsInner { #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")] pub position_id: Option, #[serde(rename = "redeemId", skip_serializing_if = "Option::is_none")] pub redeem_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "lockPeriod", skip_serializing_if = "Option::is_none")] pub lock_period: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "originalAmount", skip_serializing_if = "Option::is_none")] pub original_amount: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "deliverDate", skip_serializing_if = "Option::is_none")] pub deliver_date: Option, #[serde(rename = "lossAmount", skip_serializing_if = "Option::is_none")] pub loss_amount: Option, #[serde(rename = "isComplete", skip_serializing_if = "Option::is_none")] pub is_complete: Option, #[serde(rename = "rewardAsset", skip_serializing_if = "Option::is_none")] pub reward_asset: Option, #[serde(rename = "rewardAmt", skip_serializing_if = "Option::is_none")] pub reward_amt: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetOnChainYieldsLockedRedemptionRecordResponseRowsInner { #[must_use] pub fn new() -> GetOnChainYieldsLockedRedemptionRecordResponseRowsInner { GetOnChainYieldsLockedRedemptionRecordResponseRowsInner { position_id: None, redeem_id: None, time: None, asset: None, lock_period: None, amount: None, original_amount: None, r#type: None, deliver_date: None, loss_amount: None, is_complete: None, reward_asset: None, reward_amt: None, status: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_rewards_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedRewardsHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetOnChainYieldsLockedRewardsHistoryResponse { #[must_use] pub fn new() -> GetOnChainYieldsLockedRewardsHistoryResponse { GetOnChainYieldsLockedRewardsHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_rewards_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedRewardsHistoryResponseRowsInner { #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")] pub position_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "lockPeriod", skip_serializing_if = "Option::is_none")] pub lock_period: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, } impl GetOnChainYieldsLockedRewardsHistoryResponseRowsInner { #[must_use] pub fn new() -> GetOnChainYieldsLockedRewardsHistoryResponseRowsInner { GetOnChainYieldsLockedRewardsHistoryResponseRowsInner { position_id: None, time: None, asset: None, lock_period: None, amount: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_subscription_preview_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedSubscriptionPreviewResponse { #[serde(rename = "rewardAsset", skip_serializing_if = "Option::is_none")] pub reward_asset: Option, #[serde(rename = "totalRewardAmt", skip_serializing_if = "Option::is_none")] pub total_reward_amt: Option, #[serde(rename = "nextPay", skip_serializing_if = "Option::is_none")] pub next_pay: Option, #[serde(rename = "nextPayDate", skip_serializing_if = "Option::is_none")] pub next_pay_date: Option, #[serde(rename = "rewardsPayDate", skip_serializing_if = "Option::is_none")] pub rewards_pay_date: Option, #[serde(rename = "valueDate", skip_serializing_if = "Option::is_none")] pub value_date: Option, #[serde(rename = "rewardsEndDate", skip_serializing_if = "Option::is_none")] pub rewards_end_date: Option, #[serde(rename = "deliverDate", skip_serializing_if = "Option::is_none")] pub deliver_date: Option, #[serde( rename = "nextSubscriptionDate", skip_serializing_if = "Option::is_none" )] pub next_subscription_date: Option, } impl GetOnChainYieldsLockedSubscriptionPreviewResponse { #[must_use] pub fn new() -> GetOnChainYieldsLockedSubscriptionPreviewResponse { GetOnChainYieldsLockedSubscriptionPreviewResponse { reward_asset: None, total_reward_amt: None, next_pay: None, next_pay_date: None, rewards_pay_date: None, value_date: None, rewards_end_date: None, deliver_date: None, next_subscription_date: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_subscription_record_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedSubscriptionRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetOnChainYieldsLockedSubscriptionRecordResponse { #[must_use] pub fn new() -> GetOnChainYieldsLockedSubscriptionRecordResponse { GetOnChainYieldsLockedSubscriptionRecordResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_on_chain_yields_locked_subscription_record_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOnChainYieldsLockedSubscriptionRecordResponseRowsInner { #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")] pub position_id: Option, #[serde(rename = "purchaseId", skip_serializing_if = "Option::is_none")] pub purchase_id: Option, #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")] pub project_id: Option, #[serde(rename = "clientId", skip_serializing_if = "Option::is_none")] pub client_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "lockPeriod", skip_serializing_if = "Option::is_none")] pub lock_period: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "sourceAccount", skip_serializing_if = "Option::is_none")] pub source_account: Option, #[serde(rename = "amtFromSpot", skip_serializing_if = "Option::is_none")] pub amt_from_spot: Option, #[serde(rename = "amtFromFunding", skip_serializing_if = "Option::is_none")] pub amt_from_funding: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetOnChainYieldsLockedSubscriptionRecordResponseRowsInner { #[must_use] pub fn new() -> GetOnChainYieldsLockedSubscriptionRecordResponseRowsInner { GetOnChainYieldsLockedSubscriptionRecordResponseRowsInner { position_id: None, purchase_id: None, project_id: None, client_id: None, time: None, asset: None, amount: None, lock_period: None, r#type: None, source_account: None, amt_from_spot: None, amt_from_funding: None, status: None, } } } src/staking/rest_api/models/get_soft_staking_product_list_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSoftStakingProductListResponse { #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "totalRewardsUsdt", skip_serializing_if = "Option::is_none")] pub total_rewards_usdt: Option, #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetSoftStakingProductListResponse { #[must_use] pub fn new() -> GetSoftStakingProductListResponse { GetSoftStakingProductListResponse { status: None, total_rewards_usdt: None, rows: None, total: None, } } } src/staking/rest_api/models/get_soft_staking_product_list_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSoftStakingProductListResponseRowsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "minAmount", skip_serializing_if = "Option::is_none")] pub min_amount: Option, #[serde(rename = "maxCap", skip_serializing_if = "Option::is_none")] pub max_cap: Option, #[serde(rename = "apr", skip_serializing_if = "Option::is_none")] pub apr: Option, #[serde(rename = "stakedAmount", skip_serializing_if = "Option::is_none")] pub staked_amount: Option, #[serde(rename = "totalProfit", skip_serializing_if = "Option::is_none")] pub total_profit: Option, } impl GetSoftStakingProductListResponseRowsInner { #[must_use] pub fn new() -> GetSoftStakingProductListResponseRowsInner { GetSoftStakingProductListResponseRowsInner { asset: None, min_amount: None, max_cap: None, apr: None, staked_amount: None, total_profit: None, } } } src/staking/rest_api/models/get_soft_staking_rewards_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSoftStakingRewardsHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetSoftStakingRewardsHistoryResponse { #[must_use] pub fn new() -> GetSoftStakingRewardsHistoryResponse { GetSoftStakingRewardsHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_soft_staking_rewards_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSoftStakingRewardsHistoryResponseRowsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "rewards", skip_serializing_if = "Option::is_none")] pub rewards: Option, #[serde(rename = "rewardAsset", skip_serializing_if = "Option::is_none")] pub reward_asset: Option, #[serde(rename = "avgAmount", skip_serializing_if = "Option::is_none")] pub avg_amount: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl GetSoftStakingRewardsHistoryResponseRowsInner { #[must_use] pub fn new() -> GetSoftStakingRewardsHistoryResponseRowsInner { GetSoftStakingRewardsHistoryResponseRowsInner { asset: None, rewards: None, reward_asset: None, avg_amount: None, time: None, } } } src/staking/rest_api/models/get_sol_redemption_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSolRedemptionHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetSolRedemptionHistoryResponse { #[must_use] pub fn new() -> GetSolRedemptionHistoryResponse { GetSolRedemptionHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_sol_redemption_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSolRedemptionHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "arrivalTime", skip_serializing_if = "Option::is_none")] pub arrival_time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "distributeAsset", skip_serializing_if = "Option::is_none")] pub distribute_asset: Option, #[serde(rename = "distributeAmount", skip_serializing_if = "Option::is_none")] pub distribute_amount: Option, #[serde(rename = "exchangeRate", skip_serializing_if = "Option::is_none")] pub exchange_rate: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetSolRedemptionHistoryResponseRowsInner { #[must_use] pub fn new() -> GetSolRedemptionHistoryResponseRowsInner { GetSolRedemptionHistoryResponseRowsInner { time: None, arrival_time: None, asset: None, amount: None, distribute_asset: None, distribute_amount: None, exchange_rate: None, status: None, } } } src/staking/rest_api/models/get_sol_staking_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSolStakingHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetSolStakingHistoryResponse { #[must_use] pub fn new() -> GetSolStakingHistoryResponse { GetSolStakingHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_sol_staking_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSolStakingHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "distributeAsset", skip_serializing_if = "Option::is_none")] pub distribute_asset: Option, #[serde(rename = "distributeAmount", skip_serializing_if = "Option::is_none")] pub distribute_amount: Option, #[serde(rename = "exchangeRate", skip_serializing_if = "Option::is_none")] pub exchange_rate: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetSolStakingHistoryResponseRowsInner { #[must_use] pub fn new() -> GetSolStakingHistoryResponseRowsInner { GetSolStakingHistoryResponseRowsInner { time: None, asset: None, amount: None, distribute_asset: None, distribute_amount: None, exchange_rate: None, status: None, } } } src/staking/rest_api/models/get_sol_staking_quota_details_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSolStakingQuotaDetailsResponse { #[serde( rename = "leftStakingPersonalQuota", skip_serializing_if = "Option::is_none" )] pub left_staking_personal_quota: Option, #[serde( rename = "leftRedemptionPersonalQuota", skip_serializing_if = "Option::is_none" )] pub left_redemption_personal_quota: Option, #[serde(rename = "minStakeAmount", skip_serializing_if = "Option::is_none")] pub min_stake_amount: Option, #[serde(rename = "minRedeemAmount", skip_serializing_if = "Option::is_none")] pub min_redeem_amount: Option, #[serde(rename = "redeemPeriod", skip_serializing_if = "Option::is_none")] pub redeem_period: Option, #[serde(rename = "stakeable", skip_serializing_if = "Option::is_none")] pub stakeable: Option, #[serde(rename = "redeemable", skip_serializing_if = "Option::is_none")] pub redeemable: Option, #[serde(rename = "soldOut", skip_serializing_if = "Option::is_none")] pub sold_out: Option, #[serde(rename = "commissionFee", skip_serializing_if = "Option::is_none")] pub commission_fee: Option, #[serde(rename = "nextEpochTime", skip_serializing_if = "Option::is_none")] pub next_epoch_time: Option, #[serde(rename = "calculating", skip_serializing_if = "Option::is_none")] pub calculating: Option, } impl GetSolStakingQuotaDetailsResponse { #[must_use] pub fn new() -> GetSolStakingQuotaDetailsResponse { GetSolStakingQuotaDetailsResponse { left_staking_personal_quota: None, left_redemption_personal_quota: None, min_stake_amount: None, min_redeem_amount: None, redeem_period: None, stakeable: None, redeemable: None, sold_out: None, commission_fee: None, next_epoch_time: None, calculating: None, } } } src/staking/rest_api/models/get_unclaimed_rewards_response_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetUnclaimedRewardsResponseInner { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "rewardsAsset", skip_serializing_if = "Option::is_none")] pub rewards_asset: Option, } impl GetUnclaimedRewardsResponseInner { #[must_use] pub fn new() -> GetUnclaimedRewardsResponseInner { GetUnclaimedRewardsResponseInner { amount: None, rewards_asset: None, } } } src/staking/rest_api/models/get_wbeth_rate_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetWbethRateHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetWbethRateHistoryResponse { #[must_use] pub fn new() -> GetWbethRateHistoryResponse { GetWbethRateHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_wbeth_rate_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetWbethRateHistoryResponseRowsInner { #[serde( rename = "annualPercentageRate", skip_serializing_if = "Option::is_none" )] pub annual_percentage_rate: Option, #[serde(rename = "exchangeRate", skip_serializing_if = "Option::is_none")] pub exchange_rate: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl GetWbethRateHistoryResponseRowsInner { #[must_use] pub fn new() -> GetWbethRateHistoryResponseRowsInner { GetWbethRateHistoryResponseRowsInner { annual_percentage_rate: None, exchange_rate: None, time: None, } } } src/staking/rest_api/models/get_wbeth_rewards_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetWbethRewardsHistoryResponse { #[serde(rename = "estRewardsInETH", skip_serializing_if = "Option::is_none")] pub est_rewards_in_eth: Option, #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetWbethRewardsHistoryResponse { #[must_use] pub fn new() -> GetWbethRewardsHistoryResponse { GetWbethRewardsHistoryResponse { est_rewards_in_eth: None, rows: None, total: None, } } } src/staking/rest_api/models/get_wbeth_rewards_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetWbethRewardsHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "amountInETH", skip_serializing_if = "Option::is_none")] pub amount_in_eth: Option, #[serde(rename = "holding", skip_serializing_if = "Option::is_none")] pub holding: Option, #[serde(rename = "holdingInETH", skip_serializing_if = "Option::is_none")] pub holding_in_eth: Option, #[serde( rename = "annualPercentageRate", skip_serializing_if = "Option::is_none" )] pub annual_percentage_rate: Option, } impl GetWbethRewardsHistoryResponseRowsInner { #[must_use] pub fn new() -> GetWbethRewardsHistoryResponseRowsInner { GetWbethRewardsHistoryResponseRowsInner { time: None, amount_in_eth: None, holding: None, holding_in_eth: None, annual_percentage_rate: None, } } } src/staking/rest_api/models/get_wbeth_unwrap_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetWbethUnwrapHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetWbethUnwrapHistoryResponse { #[must_use] pub fn new() -> GetWbethUnwrapHistoryResponse { GetWbethUnwrapHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_wbeth_unwrap_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetWbethUnwrapHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")] pub from_asset: Option, #[serde(rename = "fromAmount", skip_serializing_if = "Option::is_none")] pub from_amount: Option, #[serde(rename = "toAsset", skip_serializing_if = "Option::is_none")] pub to_asset: Option, #[serde(rename = "toAmount", skip_serializing_if = "Option::is_none")] pub to_amount: Option, #[serde(rename = "exchangeRate", skip_serializing_if = "Option::is_none")] pub exchange_rate: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetWbethUnwrapHistoryResponseRowsInner { #[must_use] pub fn new() -> GetWbethUnwrapHistoryResponseRowsInner { GetWbethUnwrapHistoryResponseRowsInner { time: None, from_asset: None, from_amount: None, to_asset: None, to_amount: None, exchange_rate: None, status: None, } } } src/staking/rest_api/models/get_wbeth_wrap_history_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetWbethWrapHistoryResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetWbethWrapHistoryResponse { #[must_use] pub fn new() -> GetWbethWrapHistoryResponse { GetWbethWrapHistoryResponse { rows: None, total: None, } } } src/staking/rest_api/models/get_wbeth_wrap_history_response_rows_inner.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetWbethWrapHistoryResponseRowsInner { #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")] pub from_asset: Option, #[serde(rename = "fromAmount", skip_serializing_if = "Option::is_none")] pub from_amount: Option, #[serde(rename = "toAsset", skip_serializing_if = "Option::is_none")] pub to_asset: Option, #[serde(rename = "toAmount", skip_serializing_if = "Option::is_none")] pub to_amount: Option, #[serde(rename = "exchangeRate", skip_serializing_if = "Option::is_none")] pub exchange_rate: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetWbethWrapHistoryResponseRowsInner { #[must_use] pub fn new() -> GetWbethWrapHistoryResponseRowsInner { GetWbethWrapHistoryResponseRowsInner { time: None, from_asset: None, from_amount: None, to_asset: None, to_amount: None, exchange_rate: None, status: None, } } } src/staking/rest_api/models/on_chain_yields_account_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OnChainYieldsAccountResponse { #[serde(rename = "totalAmountInBTC", skip_serializing_if = "Option::is_none")] pub total_amount_in_btc: Option, #[serde(rename = "totalAmountInUSDT", skip_serializing_if = "Option::is_none")] pub total_amount_in_usdt: Option, #[serde( rename = "totalFlexibleAmountInBTC", skip_serializing_if = "Option::is_none" )] pub total_flexible_amount_in_btc: Option, #[serde( rename = "totalFlexibleAmountInUSDT", skip_serializing_if = "Option::is_none" )] pub total_flexible_amount_in_usdt: Option, #[serde(rename = "totalLockedInBTC", skip_serializing_if = "Option::is_none")] pub total_locked_in_btc: Option, #[serde(rename = "totalLockedInUSDT", skip_serializing_if = "Option::is_none")] pub total_locked_in_usdt: Option, } impl OnChainYieldsAccountResponse { #[must_use] pub fn new() -> OnChainYieldsAccountResponse { OnChainYieldsAccountResponse { total_amount_in_btc: None, total_amount_in_usdt: None, total_flexible_amount_in_btc: None, total_flexible_amount_in_usdt: None, total_locked_in_btc: None, total_locked_in_usdt: None, } } } src/staking/rest_api/models/redeem_eth_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RedeemEthResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "ethAmount", skip_serializing_if = "Option::is_none")] pub eth_amount: Option, #[serde(rename = "conversionRatio", skip_serializing_if = "Option::is_none")] pub conversion_ratio: Option, #[serde(rename = "arrivalTime", skip_serializing_if = "Option::is_none")] pub arrival_time: Option, } impl RedeemEthResponse { #[must_use] pub fn new() -> RedeemEthResponse { RedeemEthResponse { success: None, eth_amount: None, conversion_ratio: None, arrival_time: None, } } } src/staking/rest_api/models/redeem_on_chain_yields_locked_product_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RedeemOnChainYieldsLockedProductResponse { #[serde(rename = "redeemId", skip_serializing_if = "Option::is_none")] pub redeem_id: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl RedeemOnChainYieldsLockedProductResponse { #[must_use] pub fn new() -> RedeemOnChainYieldsLockedProductResponse { RedeemOnChainYieldsLockedProductResponse { redeem_id: None, success: None, } } } src/staking/rest_api/models/redeem_sol_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RedeemSolResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "solAmount", skip_serializing_if = "Option::is_none")] pub sol_amount: Option, #[serde(rename = "exchangeRate", skip_serializing_if = "Option::is_none")] pub exchange_rate: Option, #[serde(rename = "arrivalTime", skip_serializing_if = "Option::is_none")] pub arrival_time: Option, } impl RedeemSolResponse { #[must_use] pub fn new() -> RedeemSolResponse { RedeemSolResponse { success: None, sol_amount: None, exchange_rate: None, arrival_time: None, } } } src/staking/rest_api/models/set_on_chain_yields_locked_auto_subscribe_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SetOnChainYieldsLockedAutoSubscribeResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl SetOnChainYieldsLockedAutoSubscribeResponse { #[must_use] pub fn new() -> SetOnChainYieldsLockedAutoSubscribeResponse { SetOnChainYieldsLockedAutoSubscribeResponse { success: None } } } src/staking/rest_api/models/set_on_chain_yields_locked_product_redeem_option_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SetOnChainYieldsLockedProductRedeemOptionResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl SetOnChainYieldsLockedProductRedeemOptionResponse { #[must_use] pub fn new() -> SetOnChainYieldsLockedProductRedeemOptionResponse { SetOnChainYieldsLockedProductRedeemOptionResponse { success: None } } } src/staking/rest_api/models/set_soft_staking_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SetSoftStakingResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl SetSoftStakingResponse { #[must_use] pub fn new() -> SetSoftStakingResponse { SetSoftStakingResponse { success: None } } } src/staking/rest_api/models/sol_staking_account_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SolStakingAccountResponse { #[serde(rename = "bnsolAmount", skip_serializing_if = "Option::is_none")] pub bnsol_amount: Option, #[serde(rename = "holdingInSOL", skip_serializing_if = "Option::is_none")] pub holding_in_sol: Option, #[serde( rename = "thirtyDaysProfitInSOL", skip_serializing_if = "Option::is_none" )] pub thirty_days_profit_in_sol: Option, } impl SolStakingAccountResponse { #[must_use] pub fn new() -> SolStakingAccountResponse { SolStakingAccountResponse { bnsol_amount: None, holding_in_sol: None, thirty_days_profit_in_sol: None, } } } src/staking/rest_api/models/subscribe_eth_staking_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubscribeEthStakingResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "wbethAmount", skip_serializing_if = "Option::is_none")] pub wbeth_amount: Option, #[serde(rename = "conversionRatio", skip_serializing_if = "Option::is_none")] pub conversion_ratio: Option, } impl SubscribeEthStakingResponse { #[must_use] pub fn new() -> SubscribeEthStakingResponse { SubscribeEthStakingResponse { success: None, wbeth_amount: None, conversion_ratio: None, } } } src/staking/rest_api/models/subscribe_on_chain_yields_locked_product_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubscribeOnChainYieldsLockedProductResponse { #[serde(rename = "purchaseId", skip_serializing_if = "Option::is_none")] pub purchase_id: Option, #[serde(rename = "positionId", skip_serializing_if = "Option::is_none")] pub position_id: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl SubscribeOnChainYieldsLockedProductResponse { #[must_use] pub fn new() -> SubscribeOnChainYieldsLockedProductResponse { SubscribeOnChainYieldsLockedProductResponse { purchase_id: None, position_id: None, amount: None, success: None, } } } src/staking/rest_api/models/subscribe_sol_staking_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubscribeSolStakingResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "bnsolAmount", skip_serializing_if = "Option::is_none")] pub bnsol_amount: Option, #[serde(rename = "exchangeRate", skip_serializing_if = "Option::is_none")] pub exchange_rate: Option, } impl SubscribeSolStakingResponse { #[must_use] pub fn new() -> SubscribeSolStakingResponse { SubscribeSolStakingResponse { success: None, bnsol_amount: None, exchange_rate: None, } } } src/staking/rest_api/models/wrap_beth_response.rs /* * Binance Staking REST API * * OpenAPI Specification for the Binance Staking REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::staking::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct WrapBethResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "wbethAmount", skip_serializing_if = "Option::is_none")] pub wbeth_amount: Option, #[serde(rename = "exchangeRate", skip_serializing_if = "Option::is_none")] pub exchange_rate: Option, } impl WrapBethResponse { #[must_use] pub fn new() -> WrapBethResponse { WrapBethResponse { success: None, wbeth_amount: None, exchange_rate: None, } } } src/sub_account/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::sub_account; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = sub_account::SubAccountRestApi::production(configuration); let params = sub_account::rest_api::GetSummaryOfSubAccountsMarginAccountParams::default(); let response = client.get_summary_of_sub_accounts_margin_account(params).await?; ``` src/sub_account/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::sub_account; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = sub_account::SubAccountRestApi::production(configuration); let params = sub_account::rest_api::GetSummaryOfSubAccountsMarginAccountParams::default(); let response = client.get_summary_of_sub_accounts_margin_account(params).await?; ``` src/sub_account/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::sub_account; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = sub_account::SubAccountRestApi::production(configuration); let params = sub_account::rest_api::GetSummaryOfSubAccountsMarginAccountParams::default(); match client.get_summary_of_sub_accounts_margin_account(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/sub_account/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::sub_account; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = sub_account::SubAccountRestApi::production(configuration); let params = sub_account::rest_api::GetSummaryOfSubAccountsMarginAccountParams::default(); let response = client.get_summary_of_sub_accounts_margin_account(params).await?; ``` src/sub_account/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::sub_account; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = sub_account::SubAccountRestApi::production(configuration); let params = sub_account::rest_api::GetSummaryOfSubAccountsMarginAccountParams::default(); let response = client.get_summary_of_sub_accounts_margin_account(params).await?; ``` src/sub_account/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::sub_account; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = sub_account::SubAccountRestApi::production(configuration); let params = sub_account::rest_api::GetSummaryOfSubAccountsMarginAccountParams::default(); let response = client.get_summary_of_sub_accounts_margin_account(params).await?; ``` src/sub_account/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::sub_account; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = sub_account::SubAccountRestApi::production(configuration); let params = sub_account::rest_api::GetSummaryOfSubAccountsMarginAccountParams::default(); let response = client.get_summary_of_sub_accounts_margin_account(params).await?; ``` src/sub_account/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::sub_account; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = sub_account::SubAccountRestApi::production(configuration); let params = sub_account::rest_api::GetSummaryOfSubAccountsMarginAccountParams::default(); let response = client.get_summary_of_sub_accounts_margin_account(params).await?; ``` src/sub_account/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::sub_account; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = sub_account::SubAccountRestApi::production(configuration); let params = sub_account::rest_api::GetSummaryOfSubAccountsMarginAccountParams::default(); let response = client.get_summary_of_sub_accounts_margin_account(params).await?; ``` src/sub_account/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::SUB_ACCOUNT_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the `SubAccount` REST API client for interacting with the Binance `SubAccount` REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct SubAccountRestApi {} impl SubAccountRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production `SubAccount` REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("sub-account"); if config.base_path.is_none() { config.base_path = Some(SUB_ACCOUNT_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(SUB_ACCOUNT_REST_API_PROD_URL.to_string()); SubAccountRestApi::from_config(config) } } src/sub_account/rest_api/apis/mod.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_management_api; pub use account_management_api::*; pub mod api_management_api; pub use api_management_api::*; pub mod asset_management_api; pub use asset_management_api::*; pub mod managed_sub_account_api; pub use managed_sub_account_api::*; src/sub_account/rest_api/models/add_ip_restriction_for_sub_account_api_key_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AddIpRestrictionForSubAccountApiKeyResponse { #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "ipList", skip_serializing_if = "Option::is_none")] pub ip_list: Option>, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")] pub api_key: Option, } impl AddIpRestrictionForSubAccountApiKeyResponse { #[must_use] pub fn new() -> AddIpRestrictionForSubAccountApiKeyResponse { AddIpRestrictionForSubAccountApiKeyResponse { status: None, ip_list: None, update_time: None, api_key: None, } } } src/sub_account/rest_api/models/create_a_virtual_sub_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateAVirtualSubAccountResponse { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, } impl CreateAVirtualSubAccountResponse { #[must_use] pub fn new() -> CreateAVirtualSubAccountResponse { CreateAVirtualSubAccountResponse { email: None } } } src/sub_account/rest_api/models/delete_ip_list_for_a_sub_account_api_key_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DeleteIpListForASubAccountApiKeyResponse { #[serde(rename = "ipRestrict", skip_serializing_if = "Option::is_none")] pub ip_restrict: Option, #[serde(rename = "ipList", skip_serializing_if = "Option::is_none")] pub ip_list: Option>, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")] pub api_key: Option, } impl DeleteIpListForASubAccountApiKeyResponse { #[must_use] pub fn new() -> DeleteIpListForASubAccountApiKeyResponse { DeleteIpListForASubAccountApiKeyResponse { ip_restrict: None, ip_list: None, update_time: None, api_key: None, } } } src/sub_account/rest_api/models/deposit_assets_into_the_managed_sub_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepositAssetsIntoTheManagedSubAccountResponse { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl DepositAssetsIntoTheManagedSubAccountResponse { #[must_use] pub fn new() -> DepositAssetsIntoTheManagedSubAccountResponse { DepositAssetsIntoTheManagedSubAccountResponse { tran_id: None } } } src/sub_account/rest_api/models/enable_futures_for_sub_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EnableFuturesForSubAccountResponse { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "isFuturesEnabled", skip_serializing_if = "Option::is_none")] pub is_futures_enabled: Option, } impl EnableFuturesForSubAccountResponse { #[must_use] pub fn new() -> EnableFuturesForSubAccountResponse { EnableFuturesForSubAccountResponse { email: None, is_futures_enabled: None, } } } src/sub_account/rest_api/models/enable_options_for_sub_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EnableOptionsForSubAccountResponse { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "isEOptionsEnabled", skip_serializing_if = "Option::is_none")] pub is_e_options_enabled: Option, } impl EnableOptionsForSubAccountResponse { #[must_use] pub fn new() -> EnableOptionsForSubAccountResponse { EnableOptionsForSubAccountResponse { email: None, is_e_options_enabled: None, } } } src/sub_account/rest_api/models/futures_transfer_for_sub_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FuturesTransferForSubAccountResponse { #[serde(rename = "txnId", skip_serializing_if = "Option::is_none")] pub txn_id: Option, } impl FuturesTransferForSubAccountResponse { #[must_use] pub fn new() -> FuturesTransferForSubAccountResponse { FuturesTransferForSubAccountResponse { txn_id: None } } } src/sub_account/rest_api/models/get_detail_on_sub_accounts_futures_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDetailOnSubAccountsFuturesAccountResponse { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option< Vec, >, #[serde(rename = "canDeposit", skip_serializing_if = "Option::is_none")] pub can_deposit: Option, #[serde(rename = "canTrade", skip_serializing_if = "Option::is_none")] pub can_trade: Option, #[serde(rename = "canWithdraw", skip_serializing_if = "Option::is_none")] pub can_withdraw: Option, #[serde(rename = "feeTier", skip_serializing_if = "Option::is_none")] pub fee_tier: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "totalInitialMargin", skip_serializing_if = "Option::is_none")] pub total_initial_margin: Option, #[serde( rename = "totalMaintenanceMargin", skip_serializing_if = "Option::is_none" )] pub total_maintenance_margin: Option, #[serde(rename = "totalMarginBalance", skip_serializing_if = "Option::is_none")] pub total_margin_balance: Option, #[serde( rename = "totalOpenOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub total_open_order_initial_margin: Option, #[serde( rename = "totalPositionInitialMargin", skip_serializing_if = "Option::is_none" )] pub total_position_initial_margin: Option, #[serde( rename = "totalUnrealizedProfit", skip_serializing_if = "Option::is_none" )] pub total_unrealized_profit: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl GetDetailOnSubAccountsFuturesAccountResponse { #[must_use] pub fn new() -> GetDetailOnSubAccountsFuturesAccountResponse { GetDetailOnSubAccountsFuturesAccountResponse { email: None, asset: None, assets: None, can_deposit: None, can_trade: None, can_withdraw: None, fee_tier: None, max_withdraw_amount: None, total_initial_margin: None, total_maintenance_margin: None, total_margin_balance: None, total_open_order_initial_margin: None, total_position_initial_margin: None, total_unrealized_profit: None, total_wallet_balance: None, update_time: None, } } } src/sub_account/rest_api/models/get_detail_on_sub_accounts_futures_account_v2_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDetailOnSubAccountsFuturesAccountV2Response { #[serde(rename = "futureAccountResp", skip_serializing_if = "Option::is_none")] pub future_account_resp: Option>, #[serde( rename = "deliveryAccountResp", skip_serializing_if = "Option::is_none" )] pub delivery_account_resp: Option>, } impl GetDetailOnSubAccountsFuturesAccountV2Response { #[must_use] pub fn new() -> GetDetailOnSubAccountsFuturesAccountV2Response { GetDetailOnSubAccountsFuturesAccountV2Response { future_account_resp: None, delivery_account_resp: None, } } } src/sub_account/rest_api/models/get_detail_on_sub_accounts_futures_account_v2_response_delivery_account_resp.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountResp { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option< Vec, >, #[serde(rename = "canDeposit", skip_serializing_if = "Option::is_none")] pub can_deposit: Option, #[serde(rename = "canTrade", skip_serializing_if = "Option::is_none")] pub can_trade: Option, #[serde(rename = "canWithdraw", skip_serializing_if = "Option::is_none")] pub can_withdraw: Option, #[serde(rename = "feeTier", skip_serializing_if = "Option::is_none")] pub fee_tier: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountResp { #[must_use] pub fn new() -> GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountResp { GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountResp { email: None, assets: None, can_deposit: None, can_trade: None, can_withdraw: None, fee_tier: None, update_time: None, } } } src/sub_account/rest_api/models/get_detail_on_sub_accounts_futures_account_v2_response_delivery_account_resp_assets_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountRespAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintenanceMargin", skip_serializing_if = "Option::is_none")] pub maintenance_margin: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, } impl GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountRespAssetsInner { #[must_use] pub fn new() -> GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountRespAssetsInner { GetDetailOnSubAccountsFuturesAccountV2ResponseDeliveryAccountRespAssetsInner { asset: None, initial_margin: None, maintenance_margin: None, margin_balance: None, max_withdraw_amount: None, open_order_initial_margin: None, position_initial_margin: None, unrealized_profit: None, wallet_balance: None, } } } src/sub_account/rest_api/models/get_detail_on_sub_accounts_futures_account_v2_response_future_account_resp.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option< Vec, >, #[serde(rename = "canDeposit", skip_serializing_if = "Option::is_none")] pub can_deposit: Option, #[serde(rename = "canTrade", skip_serializing_if = "Option::is_none")] pub can_trade: Option, #[serde(rename = "canWithdraw", skip_serializing_if = "Option::is_none")] pub can_withdraw: Option, #[serde(rename = "feeTier", skip_serializing_if = "Option::is_none")] pub fee_tier: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde(rename = "totalInitialMargin", skip_serializing_if = "Option::is_none")] pub total_initial_margin: Option, #[serde( rename = "totalMaintenanceMargin", skip_serializing_if = "Option::is_none" )] pub total_maintenance_margin: Option, #[serde(rename = "totalMarginBalance", skip_serializing_if = "Option::is_none")] pub total_margin_balance: Option, #[serde( rename = "totalOpenOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub total_open_order_initial_margin: Option, #[serde( rename = "totalPositionInitialMargin", skip_serializing_if = "Option::is_none" )] pub total_position_initial_margin: Option, #[serde( rename = "totalUnrealizedProfit", skip_serializing_if = "Option::is_none" )] pub total_unrealized_profit: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp { #[must_use] pub fn new() -> GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp { GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountResp { email: None, assets: None, can_deposit: None, can_trade: None, can_withdraw: None, fee_tier: None, max_withdraw_amount: None, total_initial_margin: None, total_maintenance_margin: None, total_margin_balance: None, total_open_order_initial_margin: None, total_position_initial_margin: None, total_unrealized_profit: None, total_wallet_balance: None, update_time: None, } } } src/sub_account/rest_api/models/get_detail_on_sub_accounts_futures_account_v2_response_future_account_resp_assets_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "initialMargin", skip_serializing_if = "Option::is_none")] pub initial_margin: Option, #[serde(rename = "maintenanceMargin", skip_serializing_if = "Option::is_none")] pub maintenance_margin: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "maxWithdrawAmount", skip_serializing_if = "Option::is_none")] pub max_withdraw_amount: Option, #[serde( rename = "openOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub open_order_initial_margin: Option, #[serde( rename = "positionInitialMargin", skip_serializing_if = "Option::is_none" )] pub position_initial_margin: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, } impl GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner { #[must_use] pub fn new() -> GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner { GetDetailOnSubAccountsFuturesAccountV2ResponseFutureAccountRespAssetsInner { asset: None, initial_margin: None, maintenance_margin: None, margin_balance: None, max_withdraw_amount: None, open_order_initial_margin: None, position_initial_margin: None, unrealized_profit: None, wallet_balance: None, } } } src/sub_account/rest_api/models/get_detail_on_sub_accounts_margin_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDetailOnSubAccountsMarginAccountResponse { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "marginLevel", skip_serializing_if = "Option::is_none")] pub margin_level: Option, #[serde(rename = "totalAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_asset_of_btc: Option, #[serde( rename = "totalLiabilityOfBtc", skip_serializing_if = "Option::is_none" )] pub total_liability_of_btc: Option, #[serde(rename = "totalNetAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_net_asset_of_btc: Option, #[serde(rename = "marginTradeCoeffVo", skip_serializing_if = "Option::is_none")] pub margin_trade_coeff_vo: Option>, #[serde( rename = "marginUserAssetVoList", skip_serializing_if = "Option::is_none" )] pub margin_user_asset_vo_list: Option>, } impl GetDetailOnSubAccountsMarginAccountResponse { #[must_use] pub fn new() -> GetDetailOnSubAccountsMarginAccountResponse { GetDetailOnSubAccountsMarginAccountResponse { email: None, margin_level: None, total_asset_of_btc: None, total_liability_of_btc: None, total_net_asset_of_btc: None, margin_trade_coeff_vo: None, margin_user_asset_vo_list: None, } } } src/sub_account/rest_api/models/get_detail_on_sub_accounts_margin_account_response_margin_trade_coeff_vo.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDetailOnSubAccountsMarginAccountResponseMarginTradeCoeffVo { #[serde( rename = "forceLiquidationBar", skip_serializing_if = "Option::is_none" )] pub force_liquidation_bar: Option, #[serde(rename = "marginCallBar", skip_serializing_if = "Option::is_none")] pub margin_call_bar: Option, #[serde(rename = "normalBar", skip_serializing_if = "Option::is_none")] pub normal_bar: Option, } impl GetDetailOnSubAccountsMarginAccountResponseMarginTradeCoeffVo { #[must_use] pub fn new() -> GetDetailOnSubAccountsMarginAccountResponseMarginTradeCoeffVo { GetDetailOnSubAccountsMarginAccountResponseMarginTradeCoeffVo { force_liquidation_bar: None, margin_call_bar: None, normal_bar: None, } } } src/sub_account/rest_api/models/get_detail_on_sub_accounts_margin_account_response_margin_user_asset_vo_list_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetDetailOnSubAccountsMarginAccountResponseMarginUserAssetVoListInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "borrowed", skip_serializing_if = "Option::is_none")] pub borrowed: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "netAsset", skip_serializing_if = "Option::is_none")] pub net_asset: Option, } impl GetDetailOnSubAccountsMarginAccountResponseMarginUserAssetVoListInner { #[must_use] pub fn new() -> GetDetailOnSubAccountsMarginAccountResponseMarginUserAssetVoListInner { GetDetailOnSubAccountsMarginAccountResponseMarginUserAssetVoListInner { asset: None, borrowed: None, free: None, interest: None, locked: None, net_asset: None, } } } src/sub_account/rest_api/models/get_futures_position_risk_of_sub_account_v2_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesPositionRiskOfSubAccountV2Response { #[serde( rename = "futurePositionRiskVos", skip_serializing_if = "Option::is_none" )] pub future_position_risk_vos: Option>, #[serde( rename = "deliveryPositionRiskVos", skip_serializing_if = "Option::is_none" )] pub delivery_position_risk_vos: Option< Vec, >, } impl GetFuturesPositionRiskOfSubAccountV2Response { #[must_use] pub fn new() -> GetFuturesPositionRiskOfSubAccountV2Response { GetFuturesPositionRiskOfSubAccountV2Response { future_position_risk_vos: None, delivery_position_risk_vos: None, } } } src/sub_account/rest_api/models/get_futures_position_risk_of_sub_account_v2_response_delivery_position_risk_vos_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner { #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "isolated", skip_serializing_if = "Option::is_none")] pub isolated: Option, #[serde(rename = "isolatedWallet", skip_serializing_if = "Option::is_none")] pub isolated_wallet: Option, #[serde(rename = "isolatedMargin", skip_serializing_if = "Option::is_none")] pub isolated_margin: Option, #[serde(rename = "isAutoAddMargin", skip_serializing_if = "Option::is_none")] pub is_auto_add_margin: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "positionAmount", skip_serializing_if = "Option::is_none")] pub position_amount: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, } impl GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner { #[must_use] pub fn new() -> GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner { GetFuturesPositionRiskOfSubAccountV2ResponseDeliveryPositionRiskVosInner { entry_price: None, mark_price: None, leverage: None, isolated: None, isolated_wallet: None, isolated_margin: None, is_auto_add_margin: None, position_side: None, position_amount: None, symbol: None, unrealized_profit: None, } } } src/sub_account/rest_api/models/get_futures_position_risk_of_sub_account_v2_response_future_position_risk_vos_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner { #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "leverage", skip_serializing_if = "Option::is_none")] pub leverage: Option, #[serde(rename = "maxNotional", skip_serializing_if = "Option::is_none")] pub max_notional: Option, #[serde(rename = "liquidationPrice", skip_serializing_if = "Option::is_none")] pub liquidation_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "positionAmount", skip_serializing_if = "Option::is_none")] pub position_amount: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "unrealizedProfit", skip_serializing_if = "Option::is_none")] pub unrealized_profit: Option, } impl GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner { #[must_use] pub fn new() -> GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner { GetFuturesPositionRiskOfSubAccountV2ResponseFuturePositionRiskVosInner { entry_price: None, leverage: None, max_notional: None, liquidation_price: None, mark_price: None, position_amount: None, symbol: None, unrealized_profit: None, } } } src/sub_account/rest_api/models/get_ip_restriction_for_a_sub_account_api_key_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetIpRestrictionForASubAccountApiKeyResponse { #[serde(rename = "ipRestrict", skip_serializing_if = "Option::is_none")] pub ip_restrict: Option, #[serde(rename = "ipList", skip_serializing_if = "Option::is_none")] pub ip_list: Option>, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "apiKey", skip_serializing_if = "Option::is_none")] pub api_key: Option, } impl GetIpRestrictionForASubAccountApiKeyResponse { #[must_use] pub fn new() -> GetIpRestrictionForASubAccountApiKeyResponse { GetIpRestrictionForASubAccountApiKeyResponse { ip_restrict: None, ip_list: None, update_time: None, api_key: None, } } } src/sub_account/rest_api/models/get_managed_sub_account_deposit_address_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetManagedSubAccountDepositAddressResponse { #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "tag", skip_serializing_if = "Option::is_none")] pub tag: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, } impl GetManagedSubAccountDepositAddressResponse { #[must_use] pub fn new() -> GetManagedSubAccountDepositAddressResponse { GetManagedSubAccountDepositAddressResponse { coin: None, address: None, tag: None, url: None, } } } src/sub_account/rest_api/models/get_move_position_history_for_sub_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetMovePositionHistoryForSubAccountResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde( rename = "futureMovePositionOrderVoList", skip_serializing_if = "Option::is_none" )] pub future_move_position_order_vo_list: Option< Vec, >, } impl GetMovePositionHistoryForSubAccountResponse { #[must_use] pub fn new() -> GetMovePositionHistoryForSubAccountResponse { GetMovePositionHistoryForSubAccountResponse { total: None, future_move_position_order_vo_list: None, } } } src/sub_account/rest_api/models/get_move_position_history_for_sub_account_response_future_move_position_order_vo_list_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetMovePositionHistoryForSubAccountResponseFutureMovePositionOrderVoListInner { #[serde(rename = "fromUserEmail", skip_serializing_if = "Option::is_none")] pub from_user_email: Option, #[serde(rename = "toUserEmail", skip_serializing_if = "Option::is_none")] pub to_user_email: Option, #[serde(rename = "productType", skip_serializing_if = "Option::is_none")] pub product_type: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "timeStamp", skip_serializing_if = "Option::is_none")] pub time_stamp: Option, } impl GetMovePositionHistoryForSubAccountResponseFutureMovePositionOrderVoListInner { #[must_use] pub fn new() -> GetMovePositionHistoryForSubAccountResponseFutureMovePositionOrderVoListInner { GetMovePositionHistoryForSubAccountResponseFutureMovePositionOrderVoListInner { from_user_email: None, to_user_email: None, product_type: None, symbol: None, price: None, quantity: None, position_side: None, side: None, time_stamp: None, } } } src/sub_account/rest_api/models/get_sub_account_deposit_address_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSubAccountDepositAddressResponse { #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "tag", skip_serializing_if = "Option::is_none")] pub tag: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, } impl GetSubAccountDepositAddressResponse { #[must_use] pub fn new() -> GetSubAccountDepositAddressResponse { GetSubAccountDepositAddressResponse { address: None, coin: None, tag: None, url: None, } } } src/sub_account/rest_api/models/get_sub_account_deposit_history_response_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSubAccountDepositHistoryResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "addressTag", skip_serializing_if = "Option::is_none")] pub address_tag: Option, #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde(rename = "insertTime", skip_serializing_if = "Option::is_none")] pub insert_time: Option, #[serde(rename = "transferType", skip_serializing_if = "Option::is_none")] pub transfer_type: Option, #[serde(rename = "confirmTimes", skip_serializing_if = "Option::is_none")] pub confirm_times: Option, #[serde(rename = "unlockConfirm", skip_serializing_if = "Option::is_none")] pub unlock_confirm: Option, #[serde(rename = "walletType", skip_serializing_if = "Option::is_none")] pub wallet_type: Option, } impl GetSubAccountDepositHistoryResponseInner { #[must_use] pub fn new() -> GetSubAccountDepositHistoryResponseInner { GetSubAccountDepositHistoryResponseInner { id: None, amount: None, coin: None, network: None, status: None, address: None, address_tag: None, tx_id: None, insert_time: None, transfer_type: None, confirm_times: None, unlock_confirm: None, wallet_type: None, } } } src/sub_account/rest_api/models/get_sub_accounts_status_on_margin_or_futures_response_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSubAccountsStatusOnMarginOrFuturesResponseInner { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "isSubUserEnabled", skip_serializing_if = "Option::is_none")] pub is_sub_user_enabled: Option, #[serde(rename = "isUserActive", skip_serializing_if = "Option::is_none")] pub is_user_active: Option, #[serde(rename = "insertTime", skip_serializing_if = "Option::is_none")] pub insert_time: Option, #[serde(rename = "isMarginEnabled", skip_serializing_if = "Option::is_none")] pub is_margin_enabled: Option, #[serde(rename = "isFutureEnabled", skip_serializing_if = "Option::is_none")] pub is_future_enabled: Option, #[serde(rename = "mobile", skip_serializing_if = "Option::is_none")] pub mobile: Option, } impl GetSubAccountsStatusOnMarginOrFuturesResponseInner { #[must_use] pub fn new() -> GetSubAccountsStatusOnMarginOrFuturesResponseInner { GetSubAccountsStatusOnMarginOrFuturesResponseInner { email: None, is_sub_user_enabled: None, is_user_active: None, insert_time: None, is_margin_enabled: None, is_future_enabled: None, mobile: None, } } } src/sub_account/rest_api/models/get_summary_of_sub_accounts_futures_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSummaryOfSubAccountsFuturesAccountResponse { #[serde(rename = "totalInitialMargin", skip_serializing_if = "Option::is_none")] pub total_initial_margin: Option, #[serde(rename = "totalMaintenanceMargin", skip_serializing_if = "Option::is_none")] pub total_maintenance_margin: Option, #[serde(rename = "totalMarginBalance", skip_serializing_if = "Option::is_none")] pub total_margin_balance: Option, #[serde(rename = "totalOpenOrderInitialMargin", skip_serializing_if = "Option::is_none")] pub total_open_order_initial_margin: Option, #[serde(rename = "totalPositionInitialMargin", skip_serializing_if = "Option::is_none")] pub total_position_initial_margin: Option, #[serde(rename = "totalUnrealizedProfit", skip_serializing_if = "Option::is_none")] pub total_unrealized_profit: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "subAccountList", skip_serializing_if = "Option::is_none")] pub sub_account_list: Option>, } impl GetSummaryOfSubAccountsFuturesAccountResponse { #[must_use] pub fn new() -> GetSummaryOfSubAccountsFuturesAccountResponse { GetSummaryOfSubAccountsFuturesAccountResponse { total_initial_margin: None, total_maintenance_margin: None, total_margin_balance: None, total_open_order_initial_margin: None, total_position_initial_margin: None, total_unrealized_profit: None, total_wallet_balance: None, asset: None, sub_account_list: None, } } } src/sub_account/rest_api/models/get_summary_of_sub_accounts_futures_account_v2_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSummaryOfSubAccountsFuturesAccountV2Response { #[serde( rename = "futureAccountSummaryResp", skip_serializing_if = "Option::is_none" )] pub future_account_summary_resp: Option< Box, >, #[serde( rename = "deliveryAccountSummaryResp", skip_serializing_if = "Option::is_none" )] pub delivery_account_summary_resp: Option< Box, >, } impl GetSummaryOfSubAccountsFuturesAccountV2Response { #[must_use] pub fn new() -> GetSummaryOfSubAccountsFuturesAccountV2Response { GetSummaryOfSubAccountsFuturesAccountV2Response { future_account_summary_resp: None, delivery_account_summary_resp: None, } } } src/sub_account/rest_api/models/get_summary_of_sub_accounts_futures_account_v2_response_delivery_account_summary_resp.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryResp { #[serde(rename = "totalMarginBalanceOfBTC", skip_serializing_if = "Option::is_none")] pub total_margin_balance_of_btc: Option, #[serde(rename = "totalUnrealizedProfitOfBTC", skip_serializing_if = "Option::is_none")] pub total_unrealized_profit_of_btc: Option, #[serde(rename = "totalWalletBalanceOfBTC", skip_serializing_if = "Option::is_none")] pub total_wallet_balance_of_btc: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "subAccountList", skip_serializing_if = "Option::is_none")] pub sub_account_list: Option>, } impl GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryResp { #[must_use] pub fn new() -> GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryResp { GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryResp { total_margin_balance_of_btc: None, total_unrealized_profit_of_btc: None, total_wallet_balance_of_btc: None, asset: None, sub_account_list: None, } } } src/sub_account/rest_api/models/get_summary_of_sub_accounts_futures_account_v2_response_delivery_account_summary_resp_sub_account_list_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryRespSubAccountListInner { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "totalMarginBalance", skip_serializing_if = "Option::is_none")] pub total_margin_balance: Option, #[serde( rename = "totalUnrealizedProfit", skip_serializing_if = "Option::is_none" )] pub total_unrealized_profit: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, } impl GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryRespSubAccountListInner { #[must_use] pub fn new() -> GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryRespSubAccountListInner { GetSummaryOfSubAccountsFuturesAccountV2ResponseDeliveryAccountSummaryRespSubAccountListInner { email: None, total_margin_balance: None, total_unrealized_profit: None, total_wallet_balance: None, asset: None, } } } src/sub_account/rest_api/models/get_summary_of_sub_accounts_futures_account_v2_response_future_account_summary_resp.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp { #[serde(rename = "totalInitialMargin", skip_serializing_if = "Option::is_none")] pub total_initial_margin: Option, #[serde(rename = "totalMaintenanceMargin", skip_serializing_if = "Option::is_none")] pub total_maintenance_margin: Option, #[serde(rename = "totalMarginBalance", skip_serializing_if = "Option::is_none")] pub total_margin_balance: Option, #[serde(rename = "totalOpenOrderInitialMargin", skip_serializing_if = "Option::is_none")] pub total_open_order_initial_margin: Option, #[serde(rename = "totalPositionInitialMargin", skip_serializing_if = "Option::is_none")] pub total_position_initial_margin: Option, #[serde(rename = "totalUnrealizedProfit", skip_serializing_if = "Option::is_none")] pub total_unrealized_profit: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "subAccountList", skip_serializing_if = "Option::is_none")] pub sub_account_list: Option>, } impl GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp { #[must_use] pub fn new() -> GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp { GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryResp { total_initial_margin: None, total_maintenance_margin: None, total_margin_balance: None, total_open_order_initial_margin: None, total_position_initial_margin: None, total_unrealized_profit: None, total_wallet_balance: None, asset: None, sub_account_list: None, } } } src/sub_account/rest_api/models/get_summary_of_sub_accounts_futures_account_v2_response_future_account_summary_resp_sub_account_list_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "totalInitialMargin", skip_serializing_if = "Option::is_none")] pub total_initial_margin: Option, #[serde( rename = "totalMaintenanceMargin", skip_serializing_if = "Option::is_none" )] pub total_maintenance_margin: Option, #[serde(rename = "totalMarginBalance", skip_serializing_if = "Option::is_none")] pub total_margin_balance: Option, #[serde( rename = "totalOpenOrderInitialMargin", skip_serializing_if = "Option::is_none" )] pub total_open_order_initial_margin: Option, #[serde( rename = "totalPositionInitialMargin", skip_serializing_if = "Option::is_none" )] pub total_position_initial_margin: Option, #[serde( rename = "totalUnrealizedProfit", skip_serializing_if = "Option::is_none" )] pub total_unrealized_profit: Option, #[serde(rename = "totalWalletBalance", skip_serializing_if = "Option::is_none")] pub total_wallet_balance: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, } impl GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner { #[must_use] pub fn new() -> GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner { GetSummaryOfSubAccountsFuturesAccountV2ResponseFutureAccountSummaryRespSubAccountListInner { email: None, total_initial_margin: None, total_maintenance_margin: None, total_margin_balance: None, total_open_order_initial_margin: None, total_position_initial_margin: None, total_unrealized_profit: None, total_wallet_balance: None, asset: None, } } } src/sub_account/rest_api/models/get_summary_of_sub_accounts_margin_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSummaryOfSubAccountsMarginAccountResponse { #[serde(rename = "totalAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_asset_of_btc: Option, #[serde( rename = "totalLiabilityOfBtc", skip_serializing_if = "Option::is_none" )] pub total_liability_of_btc: Option, #[serde(rename = "totalNetAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_net_asset_of_btc: Option, #[serde(rename = "subAccountList", skip_serializing_if = "Option::is_none")] pub sub_account_list: Option>, } impl GetSummaryOfSubAccountsMarginAccountResponse { #[must_use] pub fn new() -> GetSummaryOfSubAccountsMarginAccountResponse { GetSummaryOfSubAccountsMarginAccountResponse { total_asset_of_btc: None, total_liability_of_btc: None, total_net_asset_of_btc: None, sub_account_list: None, } } } src/sub_account/rest_api/models/get_summary_of_sub_accounts_margin_account_response_sub_account_list_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "totalAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_asset_of_btc: Option, #[serde( rename = "totalLiabilityOfBtc", skip_serializing_if = "Option::is_none" )] pub total_liability_of_btc: Option, #[serde(rename = "totalNetAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_net_asset_of_btc: Option, } impl GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner { #[must_use] pub fn new() -> GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner { GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner { email: None, total_asset_of_btc: None, total_liability_of_btc: None, total_net_asset_of_btc: None, } } } src/sub_account/rest_api/models/margin_transfer_for_sub_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MarginTransferForSubAccountResponse { #[serde(rename = "txnId", skip_serializing_if = "Option::is_none")] pub txn_id: Option, } impl MarginTransferForSubAccountResponse { #[must_use] pub fn new() -> MarginTransferForSubAccountResponse { MarginTransferForSubAccountResponse { txn_id: None } } } src/sub_account/rest_api/models/move_position_for_sub_account_order_args_parameter_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MovePositionForSubAccountOrderArgsParameterInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, } impl MovePositionForSubAccountOrderArgsParameterInner { #[must_use] pub fn new() -> MovePositionForSubAccountOrderArgsParameterInner { MovePositionForSubAccountOrderArgsParameterInner { symbol: None, quantity: None, position_side: None, } } } src/sub_account/rest_api/models/move_position_for_sub_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MovePositionForSubAccountResponse { #[serde(rename = "movePositionOrders", skip_serializing_if = "Option::is_none")] pub move_position_orders: Option>, } impl MovePositionForSubAccountResponse { #[must_use] pub fn new() -> MovePositionForSubAccountResponse { MovePositionForSubAccountResponse { move_position_orders: None, } } } src/sub_account/rest_api/models/move_position_for_sub_account_response_move_position_orders_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MovePositionForSubAccountResponseMovePositionOrdersInner { #[serde(rename = "fromUserEmail", skip_serializing_if = "Option::is_none")] pub from_user_email: Option, #[serde(rename = "toUserEmail", skip_serializing_if = "Option::is_none")] pub to_user_email: Option, #[serde(rename = "productType", skip_serializing_if = "Option::is_none")] pub product_type: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "priceType", skip_serializing_if = "Option::is_none")] pub price_type: Option, #[serde(rename = "price", skip_serializing_if = "Option::is_none")] pub price: Option, #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] pub quantity: Option, #[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")] pub position_side: Option, #[serde(rename = "side", skip_serializing_if = "Option::is_none")] pub side: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl MovePositionForSubAccountResponseMovePositionOrdersInner { #[must_use] pub fn new() -> MovePositionForSubAccountResponseMovePositionOrdersInner { MovePositionForSubAccountResponseMovePositionOrdersInner { from_user_email: None, to_user_email: None, product_type: None, symbol: None, price_type: None, price: None, quantity: None, position_side: None, side: None, success: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_asset_details_response_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountAssetDetailsResponseInner { #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(rename = "totalBalance", skip_serializing_if = "Option::is_none")] pub total_balance: Option, #[serde(rename = "availableBalance", skip_serializing_if = "Option::is_none")] pub available_balance: Option, #[serde(rename = "inOrder", skip_serializing_if = "Option::is_none")] pub in_order: Option, #[serde(rename = "btcValue", skip_serializing_if = "Option::is_none")] pub btc_value: Option, } impl QueryManagedSubAccountAssetDetailsResponseInner { #[must_use] pub fn new() -> QueryManagedSubAccountAssetDetailsResponseInner { QueryManagedSubAccountAssetDetailsResponseInner { coin: None, name: None, total_balance: None, available_balance: None, in_order: None, btc_value: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_futures_asset_details_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountFuturesAssetDetailsResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "snapshotVos", skip_serializing_if = "Option::is_none")] pub snapshot_vos: Option>, } impl QueryManagedSubAccountFuturesAssetDetailsResponse { #[must_use] pub fn new() -> QueryManagedSubAccountFuturesAssetDetailsResponse { QueryManagedSubAccountFuturesAssetDetailsResponse { code: None, message: None, snapshot_vos: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_futures_asset_details_response_snapshot_vos_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInner { #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInner { #[must_use] pub fn new() -> QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInner { QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInner { r#type: None, update_time: None, data: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_futures_asset_details_response_snapshot_vos_inner_data.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerData { #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "position", skip_serializing_if = "Option::is_none")] pub position: Option>, } impl QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerData { #[must_use] pub fn new() -> QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerData { QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerData { assets: None, position: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_futures_asset_details_response_snapshot_vos_inner_data_assets_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, } impl QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataAssetsInner { #[must_use] pub fn new() -> QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataAssetsInner { QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataAssetsInner { asset: None, margin_balance: None, wallet_balance: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_futures_asset_details_response_snapshot_vos_inner_data_position_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataPositionInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, } impl QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataPositionInner { #[must_use] pub fn new() -> QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataPositionInner { QueryManagedSubAccountFuturesAssetDetailsResponseSnapshotVosInnerDataPositionInner { symbol: None, entry_price: None, mark_price: None, position_amt: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_list_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountListResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde( rename = "managerSubUserInfoVoList", skip_serializing_if = "Option::is_none" )] pub manager_sub_user_info_vo_list: Option>, } impl QueryManagedSubAccountListResponse { #[must_use] pub fn new() -> QueryManagedSubAccountListResponse { QueryManagedSubAccountListResponse { total: None, manager_sub_user_info_vo_list: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_list_response_manager_sub_user_info_vo_list_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountListResponseManagerSubUserInfoVoListInner { #[serde(rename = "rootUserId", skip_serializing_if = "Option::is_none")] pub root_user_id: Option, #[serde(rename = "managersubUserId", skip_serializing_if = "Option::is_none")] pub managersub_user_id: Option, #[serde(rename = "bindParentUserId", skip_serializing_if = "Option::is_none")] pub bind_parent_user_id: Option, #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "insertTimeStamp", skip_serializing_if = "Option::is_none")] pub insert_time_stamp: Option, #[serde(rename = "bindParentEmail", skip_serializing_if = "Option::is_none")] pub bind_parent_email: Option, #[serde(rename = "isSubUserEnabled", skip_serializing_if = "Option::is_none")] pub is_sub_user_enabled: Option, #[serde(rename = "isUserActive", skip_serializing_if = "Option::is_none")] pub is_user_active: Option, #[serde(rename = "isMarginEnabled", skip_serializing_if = "Option::is_none")] pub is_margin_enabled: Option, #[serde(rename = "isFutureEnabled", skip_serializing_if = "Option::is_none")] pub is_future_enabled: Option, #[serde( rename = "isSignedLVTRiskAgreement", skip_serializing_if = "Option::is_none" )] pub is_signed_lvt_risk_agreement: Option, } impl QueryManagedSubAccountListResponseManagerSubUserInfoVoListInner { #[must_use] pub fn new() -> QueryManagedSubAccountListResponseManagerSubUserInfoVoListInner { QueryManagedSubAccountListResponseManagerSubUserInfoVoListInner { root_user_id: None, managersub_user_id: None, bind_parent_user_id: None, email: None, insert_time_stamp: None, bind_parent_email: None, is_sub_user_enabled: None, is_user_active: None, is_margin_enabled: None, is_future_enabled: None, is_signed_lvt_risk_agreement: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_margin_asset_details_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountMarginAssetDetailsResponse { #[serde(rename = "marginLevel", skip_serializing_if = "Option::is_none")] pub margin_level: Option, #[serde(rename = "totalAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_asset_of_btc: Option, #[serde( rename = "totalLiabilityOfBtc", skip_serializing_if = "Option::is_none" )] pub total_liability_of_btc: Option, #[serde(rename = "totalNetAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_net_asset_of_btc: Option, #[serde(rename = "userAssets", skip_serializing_if = "Option::is_none")] pub user_assets: Option>, } impl QueryManagedSubAccountMarginAssetDetailsResponse { #[must_use] pub fn new() -> QueryManagedSubAccountMarginAssetDetailsResponse { QueryManagedSubAccountMarginAssetDetailsResponse { margin_level: None, total_asset_of_btc: None, total_liability_of_btc: None, total_net_asset_of_btc: None, user_assets: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_margin_asset_details_response_user_assets_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountMarginAssetDetailsResponseUserAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "borrowed", skip_serializing_if = "Option::is_none")] pub borrowed: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "netAsset", skip_serializing_if = "Option::is_none")] pub net_asset: Option, } impl QueryManagedSubAccountMarginAssetDetailsResponseUserAssetsInner { #[must_use] pub fn new() -> QueryManagedSubAccountMarginAssetDetailsResponseUserAssetsInner { QueryManagedSubAccountMarginAssetDetailsResponseUserAssetsInner { asset: None, borrowed: None, free: None, interest: None, locked: None, net_asset: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_snapshot_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountSnapshotResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "snapshotVos", skip_serializing_if = "Option::is_none")] pub snapshot_vos: Option>, } impl QueryManagedSubAccountSnapshotResponse { #[must_use] pub fn new() -> QueryManagedSubAccountSnapshotResponse { QueryManagedSubAccountSnapshotResponse { code: None, msg: None, snapshot_vos: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_snapshot_response_snapshot_vos_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountSnapshotResponseSnapshotVosInner { #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl QueryManagedSubAccountSnapshotResponseSnapshotVosInner { #[must_use] pub fn new() -> QueryManagedSubAccountSnapshotResponseSnapshotVosInner { QueryManagedSubAccountSnapshotResponseSnapshotVosInner { data: None, r#type: None, update_time: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_snapshot_response_snapshot_vos_inner_data.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountSnapshotResponseSnapshotVosInnerData { #[serde(rename = "balances", skip_serializing_if = "Option::is_none")] pub balances: Option< Vec, >, #[serde(rename = "totalAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_asset_of_btc: Option, #[serde(rename = "marginLevel", skip_serializing_if = "Option::is_none")] pub margin_level: Option, #[serde( rename = "totalLiabilityOfBtc", skip_serializing_if = "Option::is_none" )] pub total_liability_of_btc: Option, #[serde(rename = "totalNetAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_net_asset_of_btc: Option, #[serde(rename = "userAssets", skip_serializing_if = "Option::is_none")] pub user_assets: Option< Vec, >, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "position", skip_serializing_if = "Option::is_none")] pub position: Option< Vec, >, } impl QueryManagedSubAccountSnapshotResponseSnapshotVosInnerData { #[must_use] pub fn new() -> QueryManagedSubAccountSnapshotResponseSnapshotVosInnerData { QueryManagedSubAccountSnapshotResponseSnapshotVosInnerData { balances: None, total_asset_of_btc: None, margin_level: None, total_liability_of_btc: None, total_net_asset_of_btc: None, user_assets: None, assets: None, position: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_snapshot_response_snapshot_vos_inner_data_assets_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, } impl QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataAssetsInner { #[must_use] pub fn new() -> QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataAssetsInner { QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataAssetsInner { asset: None, margin_balance: None, wallet_balance: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_snapshot_response_snapshot_vos_inner_data_balances_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataBalancesInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, } impl QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataBalancesInner { #[must_use] pub fn new() -> QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataBalancesInner { QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataBalancesInner { asset: None, free: None, locked: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_snapshot_response_snapshot_vos_inner_data_position_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataPositionInner { #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "unRealizedProfit", skip_serializing_if = "Option::is_none")] pub un_realized_profit: Option, } impl QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataPositionInner { #[must_use] pub fn new() -> QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataPositionInner { QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataPositionInner { entry_price: None, mark_price: None, position_amt: None, symbol: None, un_realized_profit: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_snapshot_response_snapshot_vos_inner_data_user_assets_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "borrowed", skip_serializing_if = "Option::is_none")] pub borrowed: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "netAsset", skip_serializing_if = "Option::is_none")] pub net_asset: Option, } impl QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner { #[must_use] pub fn new() -> QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner { QueryManagedSubAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner { asset: None, borrowed: None, free: None, interest: None, locked: None, net_asset: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_transfer_log_master_account_investor_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountTransferLogMasterAccountInvestorResponse { #[serde(rename = "managerSubTransferHistoryVos", skip_serializing_if = "Option::is_none")] pub manager_sub_transfer_history_vos: Option>, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl QueryManagedSubAccountTransferLogMasterAccountInvestorResponse { #[must_use] pub fn new() -> QueryManagedSubAccountTransferLogMasterAccountInvestorResponse { QueryManagedSubAccountTransferLogMasterAccountInvestorResponse { manager_sub_transfer_history_vos: None, count: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_transfer_log_master_account_investor_response_manager_sub_transfer_history_vos_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountTransferLogMasterAccountInvestorResponseManagerSubTransferHistoryVosInner { #[serde(rename = "fromEmail", skip_serializing_if = "Option::is_none")] pub from_email: Option, #[serde(rename = "fromAccountType", skip_serializing_if = "Option::is_none")] pub from_account_type: Option, #[serde(rename = "toEmail", skip_serializing_if = "Option::is_none")] pub to_email: Option, #[serde(rename = "toAccountType", skip_serializing_if = "Option::is_none")] pub to_account_type: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "scheduledData", skip_serializing_if = "Option::is_none")] pub scheduled_data: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl QueryManagedSubAccountTransferLogMasterAccountInvestorResponseManagerSubTransferHistoryVosInner { #[must_use] pub fn new() -> QueryManagedSubAccountTransferLogMasterAccountInvestorResponseManagerSubTransferHistoryVosInner{ QueryManagedSubAccountTransferLogMasterAccountInvestorResponseManagerSubTransferHistoryVosInner { from_email: None, from_account_type: None, to_email: None, to_account_type: None, asset: None, amount: None, scheduled_data: None, create_time: None, status: None, tran_id: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_transfer_log_master_account_trading_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountTransferLogMasterAccountTradingResponse { #[serde(rename = "managerSubTransferHistoryVos", skip_serializing_if = "Option::is_none")] pub manager_sub_transfer_history_vos: Option>, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl QueryManagedSubAccountTransferLogMasterAccountTradingResponse { #[must_use] pub fn new() -> QueryManagedSubAccountTransferLogMasterAccountTradingResponse { QueryManagedSubAccountTransferLogMasterAccountTradingResponse { manager_sub_transfer_history_vos: None, count: None, } } } src/sub_account/rest_api/models/query_managed_sub_account_transfer_log_sub_account_trading_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryManagedSubAccountTransferLogSubAccountTradingResponse { #[serde(rename = "managerSubTransferHistoryVos", skip_serializing_if = "Option::is_none")] pub manager_sub_transfer_history_vos: Option>, #[serde(rename = "count", skip_serializing_if = "Option::is_none")] pub count: Option, } impl QueryManagedSubAccountTransferLogSubAccountTradingResponse { #[must_use] pub fn new() -> QueryManagedSubAccountTransferLogSubAccountTradingResponse { QueryManagedSubAccountTransferLogSubAccountTradingResponse { manager_sub_transfer_history_vos: None, count: None, } } } src/sub_account/rest_api/models/query_sub_account_assets_asset_management_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountAssetsAssetManagementResponse { #[serde(rename = "balances", skip_serializing_if = "Option::is_none")] pub balances: Option>, } impl QuerySubAccountAssetsAssetManagementResponse { #[must_use] pub fn new() -> QuerySubAccountAssetsAssetManagementResponse { QuerySubAccountAssetsAssetManagementResponse { balances: None } } } src/sub_account/rest_api/models/query_sub_account_assets_asset_management_response_balances_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountAssetsAssetManagementResponseBalancesInner { #[serde(rename = "freeze", skip_serializing_if = "Option::is_none")] pub freeze: Option, #[serde(rename = "withdrawing", skip_serializing_if = "Option::is_none")] pub withdrawing: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, } impl QuerySubAccountAssetsAssetManagementResponseBalancesInner { #[must_use] pub fn new() -> QuerySubAccountAssetsAssetManagementResponseBalancesInner { QuerySubAccountAssetsAssetManagementResponseBalancesInner { freeze: None, withdrawing: None, asset: None, free: None, locked: None, } } } src/sub_account/rest_api/models/query_sub_account_assets_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountAssetsResponse { #[serde(rename = "balances", skip_serializing_if = "Option::is_none")] pub balances: Option>, } impl QuerySubAccountAssetsResponse { #[must_use] pub fn new() -> QuerySubAccountAssetsResponse { QuerySubAccountAssetsResponse { balances: None } } } src/sub_account/rest_api/models/query_sub_account_assets_response_balances_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountAssetsResponseBalancesInner { #[serde(rename = "freeze", skip_serializing_if = "Option::is_none")] pub freeze: Option, #[serde(rename = "withdrawing", skip_serializing_if = "Option::is_none")] pub withdrawing: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, } impl QuerySubAccountAssetsResponseBalancesInner { #[must_use] pub fn new() -> QuerySubAccountAssetsResponseBalancesInner { QuerySubAccountAssetsResponseBalancesInner { freeze: None, withdrawing: None, asset: None, free: None, locked: None, } } } src/sub_account/rest_api/models/query_sub_account_futures_asset_transfer_history_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountFuturesAssetTransferHistoryResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "futuresType", skip_serializing_if = "Option::is_none")] pub futures_type: Option, #[serde(rename = "transfers", skip_serializing_if = "Option::is_none")] pub transfers: Option>, } impl QuerySubAccountFuturesAssetTransferHistoryResponse { #[must_use] pub fn new() -> QuerySubAccountFuturesAssetTransferHistoryResponse { QuerySubAccountFuturesAssetTransferHistoryResponse { success: None, futures_type: None, transfers: None, } } } src/sub_account/rest_api/models/query_sub_account_futures_asset_transfer_history_response_transfers_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountFuturesAssetTransferHistoryResponseTransfersInner { #[serde(rename = "from", skip_serializing_if = "Option::is_none")] pub from: Option, #[serde(rename = "to", skip_serializing_if = "Option::is_none")] pub to: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl QuerySubAccountFuturesAssetTransferHistoryResponseTransfersInner { #[must_use] pub fn new() -> QuerySubAccountFuturesAssetTransferHistoryResponseTransfersInner { QuerySubAccountFuturesAssetTransferHistoryResponseTransfersInner { from: None, to: None, asset: None, qty: None, tran_id: None, time: None, } } } src/sub_account/rest_api/models/query_sub_account_list_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountListResponse { #[serde(rename = "subAccounts", skip_serializing_if = "Option::is_none")] pub sub_accounts: Option>, } impl QuerySubAccountListResponse { #[must_use] pub fn new() -> QuerySubAccountListResponse { QuerySubAccountListResponse { sub_accounts: None } } } src/sub_account/rest_api/models/query_sub_account_list_response_sub_accounts_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountListResponseSubAccountsInner { #[serde(rename = "subUserId", skip_serializing_if = "Option::is_none")] pub sub_user_id: Option, #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "remark", skip_serializing_if = "Option::is_none")] pub remark: Option, #[serde(rename = "isFreeze", skip_serializing_if = "Option::is_none")] pub is_freeze: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde( rename = "isManagedSubAccount", skip_serializing_if = "Option::is_none" )] pub is_managed_sub_account: Option, #[serde( rename = "isAssetManagementSubAccount", skip_serializing_if = "Option::is_none" )] pub is_asset_management_sub_account: Option, } impl QuerySubAccountListResponseSubAccountsInner { #[must_use] pub fn new() -> QuerySubAccountListResponseSubAccountsInner { QuerySubAccountListResponseSubAccountsInner { sub_user_id: None, email: None, remark: None, is_freeze: None, create_time: None, is_managed_sub_account: None, is_asset_management_sub_account: None, } } } src/sub_account/rest_api/models/query_sub_account_spot_asset_transfer_history_response_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountSpotAssetTransferHistoryResponseInner { #[serde(rename = "from", skip_serializing_if = "Option::is_none")] pub from: Option, #[serde(rename = "to", skip_serializing_if = "Option::is_none")] pub to: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl QuerySubAccountSpotAssetTransferHistoryResponseInner { #[must_use] pub fn new() -> QuerySubAccountSpotAssetTransferHistoryResponseInner { QuerySubAccountSpotAssetTransferHistoryResponseInner { from: None, to: None, asset: None, qty: None, status: None, tran_id: None, time: None, } } } src/sub_account/rest_api/models/query_sub_account_spot_assets_summary_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountSpotAssetsSummaryResponse { #[serde(rename = "totalCount", skip_serializing_if = "Option::is_none")] pub total_count: Option, #[serde( rename = "masterAccountTotalAsset", skip_serializing_if = "Option::is_none" )] pub master_account_total_asset: Option, #[serde( rename = "spotSubUserAssetBtcVoList", skip_serializing_if = "Option::is_none" )] pub spot_sub_user_asset_btc_vo_list: Option>, } impl QuerySubAccountSpotAssetsSummaryResponse { #[must_use] pub fn new() -> QuerySubAccountSpotAssetsSummaryResponse { QuerySubAccountSpotAssetsSummaryResponse { total_count: None, master_account_total_asset: None, spot_sub_user_asset_btc_vo_list: None, } } } src/sub_account/rest_api/models/query_sub_account_spot_assets_summary_response_spot_sub_user_asset_btc_vo_list_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountSpotAssetsSummaryResponseSpotSubUserAssetBtcVoListInner { #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "totalAsset", skip_serializing_if = "Option::is_none")] pub total_asset: Option, } impl QuerySubAccountSpotAssetsSummaryResponseSpotSubUserAssetBtcVoListInner { #[must_use] pub fn new() -> QuerySubAccountSpotAssetsSummaryResponseSpotSubUserAssetBtcVoListInner { QuerySubAccountSpotAssetsSummaryResponseSpotSubUserAssetBtcVoListInner { email: None, total_asset: None, } } } src/sub_account/rest_api/models/query_sub_account_transaction_statistics_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountTransactionStatisticsResponse { #[serde(rename = "recent30BtcTotal", skip_serializing_if = "Option::is_none")] pub recent30_btc_total: Option, #[serde( rename = "recent30BtcFuturesTotal", skip_serializing_if = "Option::is_none" )] pub recent30_btc_futures_total: Option, #[serde( rename = "recent30BtcMarginTotal", skip_serializing_if = "Option::is_none" )] pub recent30_btc_margin_total: Option, #[serde(rename = "recent30BusdTotal", skip_serializing_if = "Option::is_none")] pub recent30_busd_total: Option, #[serde( rename = "recent30BusdFuturesTotal", skip_serializing_if = "Option::is_none" )] pub recent30_busd_futures_total: Option, #[serde( rename = "recent30BusdMarginTotal", skip_serializing_if = "Option::is_none" )] pub recent30_busd_margin_total: Option, #[serde(rename = "tradeInfoVos", skip_serializing_if = "Option::is_none")] pub trade_info_vos: Option>, } impl QuerySubAccountTransactionStatisticsResponse { #[must_use] pub fn new() -> QuerySubAccountTransactionStatisticsResponse { QuerySubAccountTransactionStatisticsResponse { recent30_btc_total: None, recent30_btc_futures_total: None, recent30_btc_margin_total: None, recent30_busd_total: None, recent30_busd_futures_total: None, recent30_busd_margin_total: None, trade_info_vos: None, } } } src/sub_account/rest_api/models/query_sub_account_transaction_statistics_response_trade_info_vos_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QuerySubAccountTransactionStatisticsResponseTradeInfoVosInner { #[serde(rename = "userId", skip_serializing_if = "Option::is_none")] pub user_id: Option, #[serde(rename = "btc", skip_serializing_if = "Option::is_none")] pub btc: Option, #[serde(rename = "btcFutures", skip_serializing_if = "Option::is_none")] pub btc_futures: Option, #[serde(rename = "btcMargin", skip_serializing_if = "Option::is_none")] pub btc_margin: Option, #[serde(rename = "busd", skip_serializing_if = "Option::is_none")] pub busd: Option, #[serde(rename = "busdFutures", skip_serializing_if = "Option::is_none")] pub busd_futures: Option, #[serde(rename = "busdMargin", skip_serializing_if = "Option::is_none")] pub busd_margin: Option, #[serde(rename = "date", skip_serializing_if = "Option::is_none")] pub date: Option, } impl QuerySubAccountTransactionStatisticsResponseTradeInfoVosInner { #[must_use] pub fn new() -> QuerySubAccountTransactionStatisticsResponseTradeInfoVosInner { QuerySubAccountTransactionStatisticsResponseTradeInfoVosInner { user_id: None, btc: None, btc_futures: None, btc_margin: None, busd: None, busd_futures: None, busd_margin: None, date: None, } } } src/sub_account/rest_api/models/query_universal_transfer_history_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUniversalTransferHistoryResponse { #[serde(rename = "result", skip_serializing_if = "Option::is_none")] pub result: Option>, #[serde(rename = "totalCount", skip_serializing_if = "Option::is_none")] pub total_count: Option, } impl QueryUniversalTransferHistoryResponse { #[must_use] pub fn new() -> QueryUniversalTransferHistoryResponse { QueryUniversalTransferHistoryResponse { result: None, total_count: None, } } } src/sub_account/rest_api/models/query_universal_transfer_history_response_result_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUniversalTransferHistoryResponseResultInner { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "fromEmail", skip_serializing_if = "Option::is_none")] pub from_email: Option, #[serde(rename = "toEmail", skip_serializing_if = "Option::is_none")] pub to_email: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "createTimeStamp", skip_serializing_if = "Option::is_none")] pub create_time_stamp: Option, #[serde(rename = "fromAccountType", skip_serializing_if = "Option::is_none")] pub from_account_type: Option, #[serde(rename = "toAccountType", skip_serializing_if = "Option::is_none")] pub to_account_type: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "clientTranId", skip_serializing_if = "Option::is_none")] pub client_tran_id: Option, } impl QueryUniversalTransferHistoryResponseResultInner { #[must_use] pub fn new() -> QueryUniversalTransferHistoryResponseResultInner { QueryUniversalTransferHistoryResponseResultInner { tran_id: None, from_email: None, to_email: None, asset: None, amount: None, create_time_stamp: None, from_account_type: None, to_account_type: None, status: None, client_tran_id: None, } } } src/sub_account/rest_api/models/sub_account_futures_asset_transfer_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubAccountFuturesAssetTransferResponse { #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, #[serde(rename = "txnId", skip_serializing_if = "Option::is_none")] pub txn_id: Option, } impl SubAccountFuturesAssetTransferResponse { #[must_use] pub fn new() -> SubAccountFuturesAssetTransferResponse { SubAccountFuturesAssetTransferResponse { success: None, txn_id: None, } } } src/sub_account/rest_api/models/sub_account_transfer_history_response_inner.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubAccountTransferHistoryResponseInner { #[serde(rename = "counterParty", skip_serializing_if = "Option::is_none")] pub counter_party: Option, #[serde(rename = "email", skip_serializing_if = "Option::is_none")] pub email: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "qty", skip_serializing_if = "Option::is_none")] pub qty: Option, #[serde(rename = "fromAccountType", skip_serializing_if = "Option::is_none")] pub from_account_type: Option, #[serde(rename = "toAccountType", skip_serializing_if = "Option::is_none")] pub to_account_type: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl SubAccountTransferHistoryResponseInner { #[must_use] pub fn new() -> SubAccountTransferHistoryResponseInner { SubAccountTransferHistoryResponseInner { counter_party: None, email: None, r#type: None, asset: None, qty: None, from_account_type: None, to_account_type: None, status: None, tran_id: None, time: None, } } } src/sub_account/rest_api/models/transfer_to_master_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TransferToMasterResponse { #[serde(rename = "txnId", skip_serializing_if = "Option::is_none")] pub txn_id: Option, } impl TransferToMasterResponse { #[must_use] pub fn new() -> TransferToMasterResponse { TransferToMasterResponse { txn_id: None } } } src/sub_account/rest_api/models/transfer_to_sub_account_of_same_master_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TransferToSubAccountOfSameMasterResponse { #[serde(rename = "txnId", skip_serializing_if = "Option::is_none")] pub txn_id: Option, } impl TransferToSubAccountOfSameMasterResponse { #[must_use] pub fn new() -> TransferToSubAccountOfSameMasterResponse { TransferToSubAccountOfSameMasterResponse { txn_id: None } } } src/sub_account/rest_api/models/universal_transfer_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UniversalTransferResponse { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "clientTranId", skip_serializing_if = "Option::is_none")] pub client_tran_id: Option, } impl UniversalTransferResponse { #[must_use] pub fn new() -> UniversalTransferResponse { UniversalTransferResponse { tran_id: None, client_tran_id: None, } } } src/sub_account/rest_api/models/withdrawl_assets_from_the_managed_sub_account_response.rs /* * Binance Sub Account REST API * * OpenAPI Specification for the Binance Sub Account REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::sub_account::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct WithdrawlAssetsFromTheManagedSubAccountResponse { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl WithdrawlAssetsFromTheManagedSubAccountResponse { #[must_use] pub fn new() -> WithdrawlAssetsFromTheManagedSubAccountResponse { WithdrawlAssetsFromTheManagedSubAccountResponse { tran_id: None } } } src/vip_loan/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::vip_loan; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = vip_loan::VIPLoanRestApi::production(configuration); let params = vip_loan::rest_api::GetCollateralAssetDataParams::default(); let response = client.get_collateral_asset_data(params).await?; ``` src/vip_loan/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::vip_loan; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = vip_loan::VIPLoanRestApi::production(configuration); let params = vip_loan::rest_api::GetCollateralAssetDataParams::default(); let response = client.get_collateral_asset_data(params).await?; ``` src/vip_loan/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::vip_loan; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = vip_loan::VIPLoanRestApi::production(configuration); let params = vip_loan::rest_api::GetCollateralAssetDataParams::default(); match client.get_collateral_asset_data(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/vip_loan/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::vip_loan; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = vip_loan::VIPLoanRestApi::production(configuration); let params = vip_loan::rest_api::GetCollateralAssetDataParams::default(); let response = client.get_collateral_asset_data(params).await?; ``` src/vip_loan/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::vip_loan; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = vip_loan::VIPLoanRestApi::production(configuration); let params = vip_loan::rest_api::GetCollateralAssetDataParams::default(); let response = client.get_collateral_asset_data(params).await?; ``` src/vip_loan/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::vip_loan; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = vip_loan::VIPLoanRestApi::production(configuration); let params = vip_loan::rest_api::GetCollateralAssetDataParams::default(); let response = client.get_collateral_asset_data(params).await?; ``` src/vip_loan/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::vip_loan; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = vip_loan::VIPLoanRestApi::production(configuration); let params = vip_loan::rest_api::GetCollateralAssetDataParams::default(); let response = client.get_collateral_asset_data(params).await?; ``` src/vip_loan/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::vip_loan; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = vip_loan::VIPLoanRestApi::production(configuration); let params = vip_loan::rest_api::GetCollateralAssetDataParams::default(); let response = client.get_collateral_asset_data(params).await?; ``` src/vip_loan/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::vip_loan; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = vip_loan::VIPLoanRestApi::production(configuration); let params = vip_loan::rest_api::GetCollateralAssetDataParams::default(); let response = client.get_collateral_asset_data(params).await?; ``` src/vip_loan/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::VIP_LOAN_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the `VIPLoan` REST API client for interacting with the Binance `VIPLoan` REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct VIPLoanRestApi {} impl VIPLoanRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production `VIPLoan` REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("vip-loan"); if config.base_path.is_none() { config.base_path = Some(VIP_LOAN_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(VIP_LOAN_REST_API_PROD_URL.to_string()); VIPLoanRestApi::from_config(config) } } src/vip_loan/rest_api/apis/mod.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod market_data_api; pub use market_data_api::*; pub mod trade_api; pub use trade_api::*; pub mod user_information_api; pub use user_information_api::*; src/vip_loan/rest_api/models/check_vip_loan_collateral_account_response.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckVipLoanCollateralAccountResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl CheckVipLoanCollateralAccountResponse { #[must_use] pub fn new() -> CheckVipLoanCollateralAccountResponse { CheckVipLoanCollateralAccountResponse { rows: None, total: None, } } } src/vip_loan/rest_api/models/check_vip_loan_collateral_account_response_rows_inner.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckVipLoanCollateralAccountResponseRowsInner { #[serde( rename = "collateralAccountId", skip_serializing_if = "Option::is_none" )] pub collateral_account_id: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, } impl CheckVipLoanCollateralAccountResponseRowsInner { #[must_use] pub fn new() -> CheckVipLoanCollateralAccountResponseRowsInner { CheckVipLoanCollateralAccountResponseRowsInner { collateral_account_id: None, collateral_coin: None, } } } src/vip_loan/rest_api/models/get_borrow_interest_rate_response_inner.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetBorrowInterestRateResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde( rename = "flexibleDailyInterestRate", skip_serializing_if = "Option::is_none" )] pub flexible_daily_interest_rate: Option, #[serde( rename = "flexibleYearlyInterestRate", skip_serializing_if = "Option::is_none" )] pub flexible_yearly_interest_rate: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl GetBorrowInterestRateResponseInner { #[must_use] pub fn new() -> GetBorrowInterestRateResponseInner { GetBorrowInterestRateResponseInner { asset: None, flexible_daily_interest_rate: None, flexible_yearly_interest_rate: None, time: None, } } } src/vip_loan/rest_api/models/get_collateral_asset_data_response.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCollateralAssetDataResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetCollateralAssetDataResponse { #[must_use] pub fn new() -> GetCollateralAssetDataResponse { GetCollateralAssetDataResponse { rows: None, total: None, } } } src/vip_loan/rest_api/models/get_collateral_asset_data_response_rows_inner.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCollateralAssetDataResponseRowsInner { #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde( rename = "_1stCollateralRatio", skip_serializing_if = "Option::is_none" )] pub _1st_collateral_ratio: Option, #[serde( rename = "_1stCollateralRange", skip_serializing_if = "Option::is_none" )] pub _1st_collateral_range: Option, #[serde( rename = "_2ndCollateralRatio", skip_serializing_if = "Option::is_none" )] pub _2nd_collateral_ratio: Option, #[serde( rename = "_2ndCollateralRange", skip_serializing_if = "Option::is_none" )] pub _2nd_collateral_range: Option, #[serde( rename = "_3rdCollateralRatio", skip_serializing_if = "Option::is_none" )] pub _3rd_collateral_ratio: Option, #[serde( rename = "_3rdCollateralRange", skip_serializing_if = "Option::is_none" )] pub _3rd_collateral_range: Option, #[serde( rename = "_4thCollateralRatio", skip_serializing_if = "Option::is_none" )] pub _4th_collateral_ratio: Option, #[serde( rename = "_4thCollateralRange", skip_serializing_if = "Option::is_none" )] pub _4th_collateral_range: Option, } impl GetCollateralAssetDataResponseRowsInner { #[must_use] pub fn new() -> GetCollateralAssetDataResponseRowsInner { GetCollateralAssetDataResponseRowsInner { collateral_coin: None, _1st_collateral_ratio: None, _1st_collateral_range: None, _2nd_collateral_ratio: None, _2nd_collateral_range: None, _3rd_collateral_ratio: None, _3rd_collateral_range: None, _4th_collateral_ratio: None, _4th_collateral_range: None, } } } src/vip_loan/rest_api/models/get_loanable_assets_data_response.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLoanableAssetsDataResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetLoanableAssetsDataResponse { #[must_use] pub fn new() -> GetLoanableAssetsDataResponse { GetLoanableAssetsDataResponse { rows: None, total: None, } } } src/vip_loan/rest_api/models/get_loanable_assets_data_response_rows_inner.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetLoanableAssetsDataResponseRowsInner { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde( rename = "_flexibleDailyInterestRate", skip_serializing_if = "Option::is_none" )] pub _flexible_daily_interest_rate: Option, #[serde( rename = "_flexibleYearlyInterestRate", skip_serializing_if = "Option::is_none" )] pub _flexible_yearly_interest_rate: Option, #[serde( rename = "_30dDailyInterestRate", skip_serializing_if = "Option::is_none" )] pub _30d_daily_interest_rate: Option, #[serde( rename = "_30dYearlyInterestRate", skip_serializing_if = "Option::is_none" )] pub _30d_yearly_interest_rate: Option, #[serde( rename = "_60dDailyInterestRate", skip_serializing_if = "Option::is_none" )] pub _60d_daily_interest_rate: Option, #[serde( rename = "_60dYearlyInterestRate", skip_serializing_if = "Option::is_none" )] pub _60d_yearly_interest_rate: Option, #[serde(rename = "minLimit", skip_serializing_if = "Option::is_none")] pub min_limit: Option, #[serde(rename = "maxLimit", skip_serializing_if = "Option::is_none")] pub max_limit: Option, #[serde(rename = "vipLevel", skip_serializing_if = "Option::is_none")] pub vip_level: Option, } impl GetLoanableAssetsDataResponseRowsInner { #[must_use] pub fn new() -> GetLoanableAssetsDataResponseRowsInner { GetLoanableAssetsDataResponseRowsInner { loan_coin: None, _flexible_daily_interest_rate: None, _flexible_yearly_interest_rate: None, _30d_daily_interest_rate: None, _30d_yearly_interest_rate: None, _60d_daily_interest_rate: None, _60d_yearly_interest_rate: None, min_limit: None, max_limit: None, vip_level: None, } } } src/vip_loan/rest_api/models/get_vip_loan_ongoing_orders_response.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetVipLoanOngoingOrdersResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl GetVipLoanOngoingOrdersResponse { #[must_use] pub fn new() -> GetVipLoanOngoingOrdersResponse { GetVipLoanOngoingOrdersResponse { rows: None, total: None, } } } src/vip_loan/rest_api/models/get_vip_loan_ongoing_orders_response_rows_inner.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetVipLoanOngoingOrdersResponseRowsInner { #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "totalDebt", skip_serializing_if = "Option::is_none")] pub total_debt: Option, #[serde(rename = "residualInterest", skip_serializing_if = "Option::is_none")] pub residual_interest: Option, #[serde( rename = "collateralAccountId", skip_serializing_if = "Option::is_none" )] pub collateral_account_id: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde( rename = "totalCollateralValueAfterHaircut", skip_serializing_if = "Option::is_none" )] pub total_collateral_value_after_haircut: Option, #[serde( rename = "lockedCollateralValue", skip_serializing_if = "Option::is_none" )] pub locked_collateral_value: Option, #[serde(rename = "currentLTV", skip_serializing_if = "Option::is_none")] pub current_ltv: Option, #[serde(rename = "expirationTime", skip_serializing_if = "Option::is_none")] pub expiration_time: Option, #[serde(rename = "loanDate", skip_serializing_if = "Option::is_none")] pub loan_date: Option, #[serde(rename = "loanTerm", skip_serializing_if = "Option::is_none")] pub loan_term: Option, } impl GetVipLoanOngoingOrdersResponseRowsInner { #[must_use] pub fn new() -> GetVipLoanOngoingOrdersResponseRowsInner { GetVipLoanOngoingOrdersResponseRowsInner { order_id: None, loan_coin: None, total_debt: None, residual_interest: None, collateral_account_id: None, collateral_coin: None, total_collateral_value_after_haircut: None, locked_collateral_value: None, current_ltv: None, expiration_time: None, loan_date: None, loan_term: None, } } } src/vip_loan/rest_api/models/mod.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod check_vip_loan_collateral_account_response; pub use self::check_vip_loan_collateral_account_response::CheckVipLoanCollateralAccountResponse; pub mod check_vip_loan_collateral_account_response_rows_inner; pub use self::check_vip_loan_collateral_account_response_rows_inner::CheckVipLoanCollateralAccountResponseRowsInner; pub mod get_borrow_interest_rate_response_inner; pub use self::get_borrow_interest_rate_response_inner::GetBorrowInterestRateResponseInner; pub mod get_collateral_asset_data_response; pub use self::get_collateral_asset_data_response::GetCollateralAssetDataResponse; pub mod get_collateral_asset_data_response_rows_inner; pub use self::get_collateral_asset_data_response_rows_inner::GetCollateralAssetDataResponseRowsInner; pub mod get_loanable_assets_data_response; pub use self::get_loanable_assets_data_response::GetLoanableAssetsDataResponse; pub mod get_loanable_assets_data_response_rows_inner; pub use self::get_loanable_assets_data_response_rows_inner::GetLoanableAssetsDataResponseRowsInner; pub mod get_vip_loan_ongoing_orders_response; pub use self::get_vip_loan_ongoing_orders_response::GetVipLoanOngoingOrdersResponse; pub mod get_vip_loan_ongoing_orders_response_rows_inner; pub use self::get_vip_loan_ongoing_orders_response_rows_inner::GetVipLoanOngoingOrdersResponseRowsInner; pub mod query_application_status_response; pub use self::query_application_status_response::QueryApplicationStatusResponse; pub mod query_application_status_response_rows_inner; pub use self::query_application_status_response_rows_inner::QueryApplicationStatusResponseRowsInner; pub mod vip_loan_borrow_response; pub use self::vip_loan_borrow_response::VipLoanBorrowResponse; pub mod vip_loan_renew_response; pub use self::vip_loan_renew_response::VipLoanRenewResponse; pub mod vip_loan_repay_response; pub use self::vip_loan_repay_response::VipLoanRepayResponse; src/vip_loan/rest_api/models/query_application_status_response.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryApplicationStatusResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl QueryApplicationStatusResponse { #[must_use] pub fn new() -> QueryApplicationStatusResponse { QueryApplicationStatusResponse { rows: None, total: None, } } } src/vip_loan/rest_api/models/query_application_status_response_rows_inner.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryApplicationStatusResponseRowsInner { #[serde(rename = "loanAccountId", skip_serializing_if = "Option::is_none")] pub loan_account_id: Option, #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")] pub order_id: Option, #[serde(rename = "requestId", skip_serializing_if = "Option::is_none")] pub request_id: Option, #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "loanAmount", skip_serializing_if = "Option::is_none")] pub loan_amount: Option, #[serde( rename = "collateralAccountId", skip_serializing_if = "Option::is_none" )] pub collateral_account_id: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "loanTerm", skip_serializing_if = "Option::is_none")] pub loan_term: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "loanDate", skip_serializing_if = "Option::is_none")] pub loan_date: Option, } impl QueryApplicationStatusResponseRowsInner { #[must_use] pub fn new() -> QueryApplicationStatusResponseRowsInner { QueryApplicationStatusResponseRowsInner { loan_account_id: None, order_id: None, request_id: None, loan_coin: None, loan_amount: None, collateral_account_id: None, collateral_coin: None, loan_term: None, status: None, loan_date: None, } } } src/vip_loan/rest_api/models/vip_loan_borrow_response.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct VipLoanBorrowResponse { #[serde(rename = "loanAccountId", skip_serializing_if = "Option::is_none")] pub loan_account_id: Option, #[serde(rename = "requestId", skip_serializing_if = "Option::is_none")] pub request_id: Option, #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "isFlexibleRate", skip_serializing_if = "Option::is_none")] pub is_flexible_rate: Option, #[serde(rename = "loanAmount", skip_serializing_if = "Option::is_none")] pub loan_amount: Option, #[serde( rename = "collateralAccountId", skip_serializing_if = "Option::is_none" )] pub collateral_account_id: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "loanTerm", skip_serializing_if = "Option::is_none")] pub loan_term: Option, } impl VipLoanBorrowResponse { #[must_use] pub fn new() -> VipLoanBorrowResponse { VipLoanBorrowResponse { loan_account_id: None, request_id: None, loan_coin: None, is_flexible_rate: None, loan_amount: None, collateral_account_id: None, collateral_coin: None, loan_term: None, } } } src/vip_loan/rest_api/models/vip_loan_renew_response.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct VipLoanRenewResponse { #[serde(rename = "loanAccountId", skip_serializing_if = "Option::is_none")] pub loan_account_id: Option, #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "loanAmount", skip_serializing_if = "Option::is_none")] pub loan_amount: Option, #[serde( rename = "collateralAccountId", skip_serializing_if = "Option::is_none" )] pub collateral_account_id: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "loanTerm", skip_serializing_if = "Option::is_none")] pub loan_term: Option, } impl VipLoanRenewResponse { #[must_use] pub fn new() -> VipLoanRenewResponse { VipLoanRenewResponse { loan_account_id: None, loan_coin: None, loan_amount: None, collateral_account_id: None, collateral_coin: None, loan_term: None, } } } src/vip_loan/rest_api/models/vip_loan_repay_response.rs /* * Binance VIP Loan REST API * * OpenAPI Specification for the Binance VIP Loan REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::vip_loan::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct VipLoanRepayResponse { #[serde(rename = "loanCoin", skip_serializing_if = "Option::is_none")] pub loan_coin: Option, #[serde(rename = "repayAmount", skip_serializing_if = "Option::is_none")] pub repay_amount: Option, #[serde(rename = "remainingPrincipal", skip_serializing_if = "Option::is_none")] pub remaining_principal: Option, #[serde(rename = "remainingInterest", skip_serializing_if = "Option::is_none")] pub remaining_interest: Option, #[serde(rename = "collateralCoin", skip_serializing_if = "Option::is_none")] pub collateral_coin: Option, #[serde(rename = "currentLTV", skip_serializing_if = "Option::is_none")] pub current_ltv: Option, #[serde(rename = "repayStatus", skip_serializing_if = "Option::is_none")] pub repay_status: Option, } impl VipLoanRepayResponse { #[must_use] pub fn new() -> VipLoanRepayResponse { VipLoanRepayResponse { loan_coin: None, repay_amount: None, remaining_principal: None, remaining_interest: None, collateral_coin: None, current_ltv: None, repay_status: None, } } } src/wallet/docs/rest_api/certificate-pinning.md # Certificate Pinning ```rust use std; use reqwest; use binance_sdk::wallet; use binance_sdk::config; let pem = std::fs::read("/path/to/pinned_cert.pem"); let cert = reqwest::Certificate::from_pem(&pem); let custom_agent = config::HttpAgent(std::sync::Arc::new(|builder: reqwest::ClientBuilder| { builder.add_root_certificate(cert.clone()) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = wallet::WalletRestApi::production(configuration); let params = wallet::rest_api::AccountInfoParams::default(); let response = client.account_info(params).await?; ``` src/wallet/docs/rest_api/compression.md # Compression Configuration ```rust use binance_sdk::wallet; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .compression(false) // default is true .build()?; let client = wallet::WalletRestApi::production(configuration); let params = wallet::rest_api::AccountInfoParams::default(); let response = client.account_info(params).await?; ``` src/wallet/docs/rest_api/error-handling.md # Error Handling ```rust use binance_sdk::wallet; use binance_sdk::config; use binance_sdk::errors; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .build()?; let client = wallet::WalletRestApi::production(configuration); let params = wallet::rest_api::AccountInfoParams::default(); match client.account_info(params).await { Ok(response) => response, Err(e) => { if let Some(conn_err) = e.downcast_ref::() { match conn_err { errors::ConnectorError::ConnectorClientError(msg) => { eprintln!("Client error: Check your request parameters. {}", msg); } errors::ConnectorError::UnauthorizedError(msg) => { eprintln!("Unauthorized: Invalid API credentials. {}", msg); } errors::ConnectorError::ForbiddenError(msg) => { eprintln!("Forbidden: Check your API key permissions. {}", msg); } errors::ConnectorError::TooManyRequestsError(msg) => { eprintln!("Rate limit exceeded. Please wait and try again. {}", msg); } errors::ConnectorError::RateLimitBanError(msg) => { eprintln!("IP address banned due to excessive rate limits. {}", msg); } errors::ConnectorError::ServerError { msg, status_code } => { eprintln!("Server error: {} (status code: {:?})", msg, status_code); } errors::ConnectorError::NetworkError(msg) => { eprintln!("Network error: Check your internet connection. {}", msg); } errors::ConnectorError::NotFoundError(msg) => { eprintln!("Resource not found. {}", msg); } errors::ConnectorError::BadRequestError(msg) => { eprintln!("Bad request: Verify your input parameters. {}", msg); } other => { eprintln!("Unexpected ConnectorError variant: {:?}", other); } } } else { eprintln!("An unexpected error occurred: {:#}", e); } return Err(e); } }; ``` src/wallet/docs/rest_api/https-agent.md # HTTPS Agent Configuration ```rust use std::sync::Arc; use reqwest::ClientBuilder; use binance_sdk::wallet; use binance_sdk::config; let custom_agent = config::HttpAgent(Arc::new(|builder: ClientBuilder| { builder.danger_accept_invalid_certs(false) })); let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .agent(custom_agent) .build()?; let client = wallet::WalletRestApi::production(configuration); let params = wallet::rest_api::AccountInfoParams::default(); let response = client.account_info(params).await?; ``` src/wallet/docs/rest_api/keep-alive.md # Keep-Alive Configuration ```rust use binance_sdk::wallet; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .keep_alive(false) // default is true .build()?; let client = wallet::WalletRestApi::production(configuration); let params = wallet::rest_api::AccountInfoParams::default(); let response = client.account_info(params).await?; ``` src/wallet/docs/rest_api/key-pair-authentication.md # Key Pair Based Authentication ```rust use binance_sdk::wallet; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .private_key(config::PrivateKey::File("your-private-key-file-path".to_string())) // Provide the private key file path .private_key_passphrase("your-passphrase".to_string()) // Optional: Required if the private key is encrypted .build()?; let client = wallet::WalletRestApi::production(configuration); let params = wallet::rest_api::AccountInfoParams::default(); let response = client.account_info(params).await?; ``` src/wallet/docs/rest_api/proxy.md # Proxy Configuration ```rust use binance_sdk::wallet; use binance_sdk::config; let proxy_config = config::ProxyConfig { host: "127.0.0.1".to_string(), port: 8080, protocol: Some("http".to_string()), auth: Some(config::ProxyAuth { username: "proxy-user".to_string(), password: "proxy-password".to_string(), }), }; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .proxy(proxy_config) .build()?; let client = wallet::WalletRestApi::production(configuration); let params = wallet::rest_api::AccountInfoParams::default(); let response = client.account_info(params).await?; ``` src/wallet/docs/rest_api/retries.md # Retries Configuration ```rust use binance_sdk::wallet; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .retries(5) // Retry up to 5 times .backoff(2000) // 2 seconds between retries .build()?; let client = wallet::WalletRestApi::production(configuration); let params = wallet::rest_api::AccountInfoParams::default(); let response = client.account_info(params).await?; ``` src/wallet/docs/rest_api/timeout.md # Timeout ```rust use binance_sdk::wallet; use binance_sdk::config; let configuration = config::ConfigurationRestApi::builder() .api_key("your-api-key") .api_secret("your-api-secret") .timeout(5000) .build()?; let client = wallet::WalletRestApi::production(configuration); let params = wallet::rest_api::AccountInfoParams::default(); let response = client.account_info(params).await?; ``` src/wallet/mod.rs pub mod rest_api; use crate::common::{ config::ConfigurationRestApi, constants::WALLET_REST_API_PROD_URL, logger, utils::build_user_agent, }; /// Represents the Wallet REST API client for interacting with the Binance Wallet REST API. /// /// This struct provides methods to create REST API clients for the production environment. pub struct WalletRestApi {} impl WalletRestApi { /// Creates a REST API client with the given configuration. /// /// If no base path is specified in the configuration, defaults to the production Wallet REST API URL. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured with the provided settings #[must_use] pub fn from_config(mut config: ConfigurationRestApi) -> rest_api::RestApi { logger::init(); config.user_agent = build_user_agent("wallet"); if config.base_path.is_none() { config.base_path = Some(WALLET_REST_API_PROD_URL.to_string()); } rest_api::RestApi::new(config) } /// Creates a REST API client configured for the production environment. /// /// # Arguments /// /// * `config` - Configuration for the REST API client /// /// # Returns /// /// A new REST API client configured for the production environment #[must_use] pub fn production(mut config: ConfigurationRestApi) -> rest_api::RestApi { config.base_path = Some(WALLET_REST_API_PROD_URL.to_string()); WalletRestApi::from_config(config) } } src/wallet/rest_api/apis/mod.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ pub mod account_api; pub use account_api::*; pub mod asset_api; pub use asset_api::*; pub mod capital_api; pub use capital_api::*; pub mod others_api; pub use others_api::*; pub mod travel_rule_api; pub use travel_rule_api::*; src/wallet/rest_api/models/account_api_trading_status_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountApiTradingStatusResponse { #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, } impl AccountApiTradingStatusResponse { #[must_use] pub fn new() -> AccountApiTradingStatusResponse { AccountApiTradingStatusResponse { data: None } } } src/wallet/rest_api/models/account_api_trading_status_response_data.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountApiTradingStatusResponseData { #[serde(rename = "isLocked", skip_serializing_if = "Option::is_none")] pub is_locked: Option, #[serde(rename = "plannedRecoverTime", skip_serializing_if = "Option::is_none")] pub planned_recover_time: Option, #[serde(rename = "triggerCondition", skip_serializing_if = "Option::is_none")] pub trigger_condition: Option>, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl AccountApiTradingStatusResponseData { #[must_use] pub fn new() -> AccountApiTradingStatusResponseData { AccountApiTradingStatusResponseData { is_locked: None, planned_recover_time: None, trigger_condition: None, update_time: None, } } } src/wallet/rest_api/models/account_api_trading_status_response_data_trigger_condition.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountApiTradingStatusResponseDataTriggerCondition { #[serde(rename = "GCR", skip_serializing_if = "Option::is_none")] pub gcr: Option, #[serde(rename = "IFER", skip_serializing_if = "Option::is_none")] pub ifer: Option, #[serde(rename = "UFR", skip_serializing_if = "Option::is_none")] pub ufr: Option, } impl AccountApiTradingStatusResponseDataTriggerCondition { #[must_use] pub fn new() -> AccountApiTradingStatusResponseDataTriggerCondition { AccountApiTradingStatusResponseDataTriggerCondition { gcr: None, ifer: None, ufr: None, } } } src/wallet/rest_api/models/account_info_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountInfoResponse { #[serde(rename = "vipLevel", skip_serializing_if = "Option::is_none")] pub vip_level: Option, #[serde(rename = "isMarginEnabled", skip_serializing_if = "Option::is_none")] pub is_margin_enabled: Option, #[serde(rename = "isFutureEnabled", skip_serializing_if = "Option::is_none")] pub is_future_enabled: Option, #[serde(rename = "isOptionsEnabled", skip_serializing_if = "Option::is_none")] pub is_options_enabled: Option, #[serde( rename = "isPortfolioMarginRetailEnabled", skip_serializing_if = "Option::is_none" )] pub is_portfolio_margin_retail_enabled: Option, } impl AccountInfoResponse { #[must_use] pub fn new() -> AccountInfoResponse { AccountInfoResponse { vip_level: None, is_margin_enabled: None, is_future_enabled: None, is_options_enabled: None, is_portfolio_margin_retail_enabled: None, } } } src/wallet/rest_api/models/account_status_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountStatusResponse { #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option, } impl AccountStatusResponse { #[must_use] pub fn new() -> AccountStatusResponse { AccountStatusResponse { data: None } } } src/wallet/rest_api/models/all_coins_information_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AllCoinsInformationResponseInner { #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "depositAllEnable", skip_serializing_if = "Option::is_none")] pub deposit_all_enable: Option, #[serde(rename = "withdrawAllEnable", skip_serializing_if = "Option::is_none")] pub withdraw_all_enable: Option, #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "freeze", skip_serializing_if = "Option::is_none")] pub freeze: Option, #[serde(rename = "withdrawing", skip_serializing_if = "Option::is_none")] pub withdrawing: Option, #[serde(rename = "ipoing", skip_serializing_if = "Option::is_none")] pub ipoing: Option, #[serde(rename = "ipoable", skip_serializing_if = "Option::is_none")] pub ipoable: Option, #[serde(rename = "storage", skip_serializing_if = "Option::is_none")] pub storage: Option, #[serde(rename = "isLegalMoney", skip_serializing_if = "Option::is_none")] pub is_legal_money: Option, #[serde(rename = "trading", skip_serializing_if = "Option::is_none")] pub trading: Option, #[serde(rename = "networkList", skip_serializing_if = "Option::is_none")] pub network_list: Option>, } impl AllCoinsInformationResponseInner { #[must_use] pub fn new() -> AllCoinsInformationResponseInner { AllCoinsInformationResponseInner { coin: None, deposit_all_enable: None, withdraw_all_enable: None, name: None, free: None, locked: None, freeze: None, withdrawing: None, ipoing: None, ipoable: None, storage: None, is_legal_money: None, trading: None, network_list: None, } } } src/wallet/rest_api/models/asset_detail_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AssetDetailResponse { #[serde(rename = "CTR", skip_serializing_if = "Option::is_none")] pub ctr: Option>, #[serde(rename = "SKY", skip_serializing_if = "Option::is_none")] pub sky: Option>, } impl AssetDetailResponse { #[must_use] pub fn new() -> AssetDetailResponse { AssetDetailResponse { ctr: None, sky: None, } } } src/wallet/rest_api/models/asset_detail_response_ctr.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AssetDetailResponseCtr { #[serde(rename = "minWithdrawAmount", skip_serializing_if = "Option::is_none")] pub min_withdraw_amount: Option, #[serde(rename = "depositStatus", skip_serializing_if = "Option::is_none")] pub deposit_status: Option, #[serde(rename = "withdrawFee", skip_serializing_if = "Option::is_none")] pub withdraw_fee: Option, #[serde(rename = "withdrawStatus", skip_serializing_if = "Option::is_none")] pub withdraw_status: Option, #[serde(rename = "depositTip", skip_serializing_if = "Option::is_none")] pub deposit_tip: Option, } impl AssetDetailResponseCtr { #[must_use] pub fn new() -> AssetDetailResponseCtr { AssetDetailResponseCtr { min_withdraw_amount: None, deposit_status: None, withdraw_fee: None, withdraw_status: None, deposit_tip: None, } } } src/wallet/rest_api/models/asset_detail_response_sky.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AssetDetailResponseSky { #[serde(rename = "minWithdrawAmount", skip_serializing_if = "Option::is_none")] pub min_withdraw_amount: Option, #[serde(rename = "depositStatus", skip_serializing_if = "Option::is_none")] pub deposit_status: Option, #[serde(rename = "withdrawFee", skip_serializing_if = "Option::is_none")] pub withdraw_fee: Option, #[serde(rename = "withdrawStatus", skip_serializing_if = "Option::is_none")] pub withdraw_status: Option, } impl AssetDetailResponseSky { #[must_use] pub fn new() -> AssetDetailResponseSky { AssetDetailResponseSky { min_withdraw_amount: None, deposit_status: None, withdraw_fee: None, withdraw_status: None, } } } src/wallet/rest_api/models/asset_dividend_record_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AssetDividendRecordResponse { #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, } impl AssetDividendRecordResponse { #[must_use] pub fn new() -> AssetDividendRecordResponse { AssetDividendRecordResponse { rows: None, total: None, } } } src/wallet/rest_api/models/asset_dividend_record_response_rows_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct AssetDividendRecordResponseRowsInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "divTime", skip_serializing_if = "Option::is_none")] pub div_time: Option, #[serde(rename = "enInfo", skip_serializing_if = "Option::is_none")] pub en_info: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl AssetDividendRecordResponseRowsInner { #[must_use] pub fn new() -> AssetDividendRecordResponseRowsInner { AssetDividendRecordResponseRowsInner { id: None, amount: None, asset: None, div_time: None, en_info: None, tran_id: None, } } } src/wallet/rest_api/models/broker_withdraw_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct BrokerWithdrawResponse { #[serde(rename = "trId", skip_serializing_if = "Option::is_none")] pub tr_id: Option, #[serde(rename = "accpted", skip_serializing_if = "Option::is_none")] pub accpted: Option, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option, } impl BrokerWithdrawResponse { #[must_use] pub fn new() -> BrokerWithdrawResponse { BrokerWithdrawResponse { tr_id: None, accpted: None, info: None, } } } src/wallet/rest_api/models/check_questionnaire_requirements_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckQuestionnaireRequirementsResponse { #[serde( rename = "questionnaireCountryCode", skip_serializing_if = "Option::is_none" )] pub questionnaire_country_code: Option, } impl CheckQuestionnaireRequirementsResponse { #[must_use] pub fn new() -> CheckQuestionnaireRequirementsResponse { CheckQuestionnaireRequirementsResponse { questionnaire_country_code: None, } } } src/wallet/rest_api/models/daily_account_snapshot_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DailyAccountSnapshotResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, #[serde(rename = "snapshotVos", skip_serializing_if = "Option::is_none")] pub snapshot_vos: Option>, } impl DailyAccountSnapshotResponse { #[must_use] pub fn new() -> DailyAccountSnapshotResponse { DailyAccountSnapshotResponse { code: None, msg: None, snapshot_vos: None, } } } src/wallet/rest_api/models/daily_account_snapshot_response_snapshot_vos_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DailyAccountSnapshotResponseSnapshotVosInner { #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option>, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")] pub update_time: Option, } impl DailyAccountSnapshotResponseSnapshotVosInner { #[must_use] pub fn new() -> DailyAccountSnapshotResponseSnapshotVosInner { DailyAccountSnapshotResponseSnapshotVosInner { data: None, r#type: None, update_time: None, } } } src/wallet/rest_api/models/daily_account_snapshot_response_snapshot_vos_inner_data.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DailyAccountSnapshotResponseSnapshotVosInnerData { #[serde(rename = "balances", skip_serializing_if = "Option::is_none")] pub balances: Option>, #[serde(rename = "totalAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_asset_of_btc: Option, #[serde(rename = "marginLevel", skip_serializing_if = "Option::is_none")] pub margin_level: Option, #[serde( rename = "totalLiabilityOfBtc", skip_serializing_if = "Option::is_none" )] pub total_liability_of_btc: Option, #[serde(rename = "totalNetAssetOfBtc", skip_serializing_if = "Option::is_none")] pub total_net_asset_of_btc: Option, #[serde(rename = "userAssets", skip_serializing_if = "Option::is_none")] pub user_assets: Option>, #[serde(rename = "assets", skip_serializing_if = "Option::is_none")] pub assets: Option>, #[serde(rename = "position", skip_serializing_if = "Option::is_none")] pub position: Option>, } impl DailyAccountSnapshotResponseSnapshotVosInnerData { #[must_use] pub fn new() -> DailyAccountSnapshotResponseSnapshotVosInnerData { DailyAccountSnapshotResponseSnapshotVosInnerData { balances: None, total_asset_of_btc: None, margin_level: None, total_liability_of_btc: None, total_net_asset_of_btc: None, user_assets: None, assets: None, position: None, } } } src/wallet/rest_api/models/daily_account_snapshot_response_snapshot_vos_inner_data_assets_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DailyAccountSnapshotResponseSnapshotVosInnerDataAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "marginBalance", skip_serializing_if = "Option::is_none")] pub margin_balance: Option, #[serde(rename = "walletBalance", skip_serializing_if = "Option::is_none")] pub wallet_balance: Option, } impl DailyAccountSnapshotResponseSnapshotVosInnerDataAssetsInner { #[must_use] pub fn new() -> DailyAccountSnapshotResponseSnapshotVosInnerDataAssetsInner { DailyAccountSnapshotResponseSnapshotVosInnerDataAssetsInner { asset: None, margin_balance: None, wallet_balance: None, } } } src/wallet/rest_api/models/daily_account_snapshot_response_snapshot_vos_inner_data_balances_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DailyAccountSnapshotResponseSnapshotVosInnerDataBalancesInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, } impl DailyAccountSnapshotResponseSnapshotVosInnerDataBalancesInner { #[must_use] pub fn new() -> DailyAccountSnapshotResponseSnapshotVosInnerDataBalancesInner { DailyAccountSnapshotResponseSnapshotVosInnerDataBalancesInner { asset: None, free: None, locked: None, } } } src/wallet/rest_api/models/daily_account_snapshot_response_snapshot_vos_inner_data_position_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DailyAccountSnapshotResponseSnapshotVosInnerDataPositionInner { #[serde(rename = "entryPrice", skip_serializing_if = "Option::is_none")] pub entry_price: Option, #[serde(rename = "markPrice", skip_serializing_if = "Option::is_none")] pub mark_price: Option, #[serde(rename = "positionAmt", skip_serializing_if = "Option::is_none")] pub position_amt: Option, #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "unRealizedProfit", skip_serializing_if = "Option::is_none")] pub un_realized_profit: Option, } impl DailyAccountSnapshotResponseSnapshotVosInnerDataPositionInner { #[must_use] pub fn new() -> DailyAccountSnapshotResponseSnapshotVosInnerDataPositionInner { DailyAccountSnapshotResponseSnapshotVosInnerDataPositionInner { entry_price: None, mark_price: None, position_amt: None, symbol: None, un_realized_profit: None, } } } src/wallet/rest_api/models/daily_account_snapshot_response_snapshot_vos_inner_data_user_assets_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DailyAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "borrowed", skip_serializing_if = "Option::is_none")] pub borrowed: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "interest", skip_serializing_if = "Option::is_none")] pub interest: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "netAsset", skip_serializing_if = "Option::is_none")] pub net_asset: Option, } impl DailyAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner { #[must_use] pub fn new() -> DailyAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner { DailyAccountSnapshotResponseSnapshotVosInnerDataUserAssetsInner { asset: None, borrowed: None, free: None, interest: None, locked: None, net_asset: None, } } } src/wallet/rest_api/models/deposit_address_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepositAddressResponse { #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "tag", skip_serializing_if = "Option::is_none")] pub tag: Option, #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, } impl DepositAddressResponse { #[must_use] pub fn new() -> DepositAddressResponse { DepositAddressResponse { address: None, coin: None, tag: None, url: None, } } } src/wallet/rest_api/models/deposit_history_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepositHistoryResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "addressTag", skip_serializing_if = "Option::is_none")] pub address_tag: Option, #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde(rename = "insertTime", skip_serializing_if = "Option::is_none")] pub insert_time: Option, #[serde(rename = "completeTime", skip_serializing_if = "Option::is_none")] pub complete_time: Option, #[serde(rename = "transferType", skip_serializing_if = "Option::is_none")] pub transfer_type: Option, #[serde(rename = "confirmTimes", skip_serializing_if = "Option::is_none")] pub confirm_times: Option, #[serde(rename = "unlockConfirm", skip_serializing_if = "Option::is_none")] pub unlock_confirm: Option, #[serde(rename = "walletType", skip_serializing_if = "Option::is_none")] pub wallet_type: Option, #[serde(rename = "travelRuleStatus", skip_serializing_if = "Option::is_none")] pub travel_rule_status: Option, } impl DepositHistoryResponseInner { #[must_use] pub fn new() -> DepositHistoryResponseInner { DepositHistoryResponseInner { id: None, amount: None, coin: None, network: None, status: None, address: None, address_tag: None, tx_id: None, insert_time: None, complete_time: None, transfer_type: None, confirm_times: None, unlock_confirm: None, wallet_type: None, travel_rule_status: None, } } } src/wallet/rest_api/models/deposit_history_travel_rule_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepositHistoryTravelRuleResponseInner { #[serde(rename = "trId", skip_serializing_if = "Option::is_none")] pub tr_id: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "depositStatus", skip_serializing_if = "Option::is_none")] pub deposit_status: Option, #[serde(rename = "travelRuleStatus", skip_serializing_if = "Option::is_none")] pub travel_rule_status: Option, #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "addressTag", skip_serializing_if = "Option::is_none")] pub address_tag: Option, #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde(rename = "insertTime", skip_serializing_if = "Option::is_none")] pub insert_time: Option, #[serde(rename = "transferType", skip_serializing_if = "Option::is_none")] pub transfer_type: Option, #[serde(rename = "confirmTimes", skip_serializing_if = "Option::is_none")] pub confirm_times: Option, #[serde(rename = "unlockConfirm", skip_serializing_if = "Option::is_none")] pub unlock_confirm: Option, #[serde(rename = "walletType", skip_serializing_if = "Option::is_none")] pub wallet_type: Option, #[serde( rename = "requireQuestionnaire", skip_serializing_if = "Option::is_none" )] pub require_questionnaire: Option, #[serde(rename = "questionnaire", skip_serializing_if = "Option::is_none")] pub questionnaire: Option, } impl DepositHistoryTravelRuleResponseInner { #[must_use] pub fn new() -> DepositHistoryTravelRuleResponseInner { DepositHistoryTravelRuleResponseInner { tr_id: None, tran_id: None, amount: None, coin: None, network: None, deposit_status: None, travel_rule_status: None, address: None, address_tag: None, tx_id: None, insert_time: None, transfer_type: None, confirm_times: None, unlock_confirm: None, wallet_type: None, require_questionnaire: None, questionnaire: None, } } } src/wallet/rest_api/models/deposit_history_v2_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepositHistoryV2ResponseInner { #[serde(rename = "depositId", skip_serializing_if = "Option::is_none")] pub deposit_id: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "depositStatus", skip_serializing_if = "Option::is_none")] pub deposit_status: Option, #[serde( rename = "travelRuleReqStatus", skip_serializing_if = "Option::is_none" )] pub travel_rule_req_status: Option, #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "addressTag", skip_serializing_if = "Option::is_none")] pub address_tag: Option, #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde(rename = "transferType", skip_serializing_if = "Option::is_none")] pub transfer_type: Option, #[serde(rename = "confirmTimes", skip_serializing_if = "Option::is_none")] pub confirm_times: Option, #[serde( rename = "requireQuestionnaire", skip_serializing_if = "Option::is_none" )] pub require_questionnaire: Option, #[serde(rename = "questionnaire", skip_serializing_if = "Option::is_none")] pub questionnaire: Option>, #[serde(rename = "insertTime", skip_serializing_if = "Option::is_none")] pub insert_time: Option, } impl DepositHistoryV2ResponseInner { #[must_use] pub fn new() -> DepositHistoryV2ResponseInner { DepositHistoryV2ResponseInner { deposit_id: None, amount: None, network: None, coin: None, deposit_status: None, travel_rule_req_status: None, address: None, address_tag: None, tx_id: None, transfer_type: None, confirm_times: None, require_questionnaire: None, questionnaire: None, insert_time: None, } } } src/wallet/rest_api/models/deposit_history_v2_response_inner_questionnaire.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DepositHistoryV2ResponseInnerQuestionnaire { #[serde(rename = "vaspName", skip_serializing_if = "Option::is_none")] pub vasp_name: Option, #[serde(rename = "depositOriginator", skip_serializing_if = "Option::is_none")] pub deposit_originator: Option, } impl DepositHistoryV2ResponseInnerQuestionnaire { #[must_use] pub fn new() -> DepositHistoryV2ResponseInnerQuestionnaire { DepositHistoryV2ResponseInnerQuestionnaire { vasp_name: None, deposit_originator: None, } } } src/wallet/rest_api/models/dust_transfer_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DustTransferResponse { #[serde(rename = "totalServiceCharge", skip_serializing_if = "Option::is_none")] pub total_service_charge: Option, #[serde(rename = "totalTransfered", skip_serializing_if = "Option::is_none")] pub total_transfered: Option, #[serde(rename = "transferResult", skip_serializing_if = "Option::is_none")] pub transfer_result: Option>, } impl DustTransferResponse { #[must_use] pub fn new() -> DustTransferResponse { DustTransferResponse { total_service_charge: None, total_transfered: None, transfer_result: None, } } } src/wallet/rest_api/models/dust_transfer_response_transfer_result_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DustTransferResponseTransferResultInner { #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")] pub from_asset: Option, #[serde(rename = "operateTime", skip_serializing_if = "Option::is_none")] pub operate_time: Option, #[serde( rename = "serviceChargeAmount", skip_serializing_if = "Option::is_none" )] pub service_charge_amount: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "transferedAmount", skip_serializing_if = "Option::is_none")] pub transfered_amount: Option, } impl DustTransferResponseTransferResultInner { #[must_use] pub fn new() -> DustTransferResponseTransferResultInner { DustTransferResponseTransferResultInner { amount: None, from_asset: None, operate_time: None, service_charge_amount: None, tran_id: None, transfered_amount: None, } } } src/wallet/rest_api/models/dustlog_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DustlogResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "userAssetDribblets", skip_serializing_if = "Option::is_none")] pub user_asset_dribblets: Option>, } impl DustlogResponse { #[must_use] pub fn new() -> DustlogResponse { DustlogResponse { total: None, user_asset_dribblets: None, } } } src/wallet/rest_api/models/dustlog_response_user_asset_dribblets_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DustlogResponseUserAssetDribbletsInner { #[serde(rename = "operateTime", skip_serializing_if = "Option::is_none")] pub operate_time: Option, #[serde( rename = "totalTransferedAmount", skip_serializing_if = "Option::is_none" )] pub total_transfered_amount: Option, #[serde( rename = "totalServiceChargeAmount", skip_serializing_if = "Option::is_none" )] pub total_service_charge_amount: Option, #[serde(rename = "transId", skip_serializing_if = "Option::is_none")] pub trans_id: Option, #[serde( rename = "userAssetDribbletDetails", skip_serializing_if = "Option::is_none" )] pub user_asset_dribblet_details: Option>, } impl DustlogResponseUserAssetDribbletsInner { #[must_use] pub fn new() -> DustlogResponseUserAssetDribbletsInner { DustlogResponseUserAssetDribbletsInner { operate_time: None, total_transfered_amount: None, total_service_charge_amount: None, trans_id: None, user_asset_dribblet_details: None, } } } src/wallet/rest_api/models/dustlog_response_user_asset_dribblets_inner_user_asset_dribblet_details_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner { #[serde(rename = "transId", skip_serializing_if = "Option::is_none")] pub trans_id: Option, #[serde( rename = "serviceChargeAmount", skip_serializing_if = "Option::is_none" )] pub service_charge_amount: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "operateTime", skip_serializing_if = "Option::is_none")] pub operate_time: Option, #[serde(rename = "transferedAmount", skip_serializing_if = "Option::is_none")] pub transfered_amount: Option, #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")] pub from_asset: Option, } impl DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner { #[must_use] pub fn new() -> DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner { DustlogResponseUserAssetDribbletsInnerUserAssetDribbletDetailsInner { trans_id: None, service_charge_amount: None, amount: None, operate_time: None, transfered_amount: None, from_asset: None, } } } src/wallet/rest_api/models/fetch_address_verification_list_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FetchAddressVerificationListResponseInner { #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "token", skip_serializing_if = "Option::is_none")] pub token: Option, #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "walletAddress", skip_serializing_if = "Option::is_none")] pub wallet_address: Option, #[serde( rename = "addressQuestionnaire", skip_serializing_if = "Option::is_none" )] pub address_questionnaire: Option>, } impl FetchAddressVerificationListResponseInner { #[must_use] pub fn new() -> FetchAddressVerificationListResponseInner { FetchAddressVerificationListResponseInner { status: None, token: None, network: None, wallet_address: None, address_questionnaire: None, } } } src/wallet/rest_api/models/fetch_address_verification_list_response_inner_address_questionnaire.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FetchAddressVerificationListResponseInnerAddressQuestionnaire { #[serde(rename = "sendTo", skip_serializing_if = "Option::is_none")] pub send_to: Option, #[serde(rename = "satoshiToken", skip_serializing_if = "Option::is_none")] pub satoshi_token: Option, #[serde(rename = "isAddressOwner", skip_serializing_if = "Option::is_none")] pub is_address_owner: Option, #[serde(rename = "verifyMethod", skip_serializing_if = "Option::is_none")] pub verify_method: Option, } impl FetchAddressVerificationListResponseInnerAddressQuestionnaire { #[must_use] pub fn new() -> FetchAddressVerificationListResponseInnerAddressQuestionnaire { FetchAddressVerificationListResponseInnerAddressQuestionnaire { send_to: None, satoshi_token: None, is_address_owner: None, verify_method: None, } } } src/wallet/rest_api/models/fetch_deposit_address_list_with_network_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FetchDepositAddressListWithNetworkResponseInner { #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "tag", skip_serializing_if = "Option::is_none")] pub tag: Option, #[serde(rename = "isDefault", skip_serializing_if = "Option::is_none")] pub is_default: Option, } impl FetchDepositAddressListWithNetworkResponseInner { #[must_use] pub fn new() -> FetchDepositAddressListWithNetworkResponseInner { FetchDepositAddressListWithNetworkResponseInner { coin: None, address: None, tag: None, is_default: None, } } } src/wallet/rest_api/models/fetch_withdraw_address_list_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FetchWithdrawAddressListResponseInner { #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "addressTag", skip_serializing_if = "Option::is_none")] pub address_tag: Option, #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "origin", skip_serializing_if = "Option::is_none")] pub origin: Option, #[serde(rename = "originType", skip_serializing_if = "Option::is_none")] pub origin_type: Option, #[serde(rename = "whiteStatus", skip_serializing_if = "Option::is_none")] pub white_status: Option, } impl FetchWithdrawAddressListResponseInner { #[must_use] pub fn new() -> FetchWithdrawAddressListResponseInner { FetchWithdrawAddressListResponseInner { address: None, address_tag: None, coin: None, name: None, network: None, origin: None, origin_type: None, white_status: None, } } } src/wallet/rest_api/models/fetch_withdraw_quota_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FetchWithdrawQuotaResponse { #[serde(rename = "wdQuota", skip_serializing_if = "Option::is_none")] pub wd_quota: Option, #[serde(rename = "usedWdQuota", skip_serializing_if = "Option::is_none")] pub used_wd_quota: Option, } impl FetchWithdrawQuotaResponse { #[must_use] pub fn new() -> FetchWithdrawQuotaResponse { FetchWithdrawQuotaResponse { wd_quota: None, used_wd_quota: None, } } } src/wallet/rest_api/models/funding_wallet_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FundingWalletResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "freeze", skip_serializing_if = "Option::is_none")] pub freeze: Option, #[serde(rename = "withdrawing", skip_serializing_if = "Option::is_none")] pub withdrawing: Option, #[serde(rename = "btcValuation", skip_serializing_if = "Option::is_none")] pub btc_valuation: Option, } impl FundingWalletResponseInner { #[must_use] pub fn new() -> FundingWalletResponseInner { FundingWalletResponseInner { asset: None, free: None, locked: None, freeze: None, withdrawing: None, btc_valuation: None, } } } src/wallet/rest_api/models/get_api_key_permission_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetApiKeyPermissionResponse { #[serde(rename = "ipRestrict", skip_serializing_if = "Option::is_none")] pub ip_restrict: Option, #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "enableReading", skip_serializing_if = "Option::is_none")] pub enable_reading: Option, #[serde(rename = "enableWithdrawals", skip_serializing_if = "Option::is_none")] pub enable_withdrawals: Option, #[serde( rename = "enableInternalTransfer", skip_serializing_if = "Option::is_none" )] pub enable_internal_transfer: Option, #[serde(rename = "enableMargin", skip_serializing_if = "Option::is_none")] pub enable_margin: Option, #[serde(rename = "enableFutures", skip_serializing_if = "Option::is_none")] pub enable_futures: Option, #[serde( rename = "permitsUniversalTransfer", skip_serializing_if = "Option::is_none" )] pub permits_universal_transfer: Option, #[serde( rename = "enableVanillaOptions", skip_serializing_if = "Option::is_none" )] pub enable_vanilla_options: Option, #[serde(rename = "enableFixApiTrade", skip_serializing_if = "Option::is_none")] pub enable_fix_api_trade: Option, #[serde(rename = "enableFixReadOnly", skip_serializing_if = "Option::is_none")] pub enable_fix_read_only: Option, #[serde( rename = "enableSpotAndMarginTrading", skip_serializing_if = "Option::is_none" )] pub enable_spot_and_margin_trading: Option, #[serde( rename = "enablePortfolioMarginTrading", skip_serializing_if = "Option::is_none" )] pub enable_portfolio_margin_trading: Option, } impl GetApiKeyPermissionResponse { #[must_use] pub fn new() -> GetApiKeyPermissionResponse { GetApiKeyPermissionResponse { ip_restrict: None, create_time: None, enable_reading: None, enable_withdrawals: None, enable_internal_transfer: None, enable_margin: None, enable_futures: None, permits_universal_transfer: None, enable_vanilla_options: None, enable_fix_api_trade: None, enable_fix_read_only: None, enable_spot_and_margin_trading: None, enable_portfolio_margin_trading: None, } } } src/wallet/rest_api/models/get_assets_that_can_be_converted_into_bnb_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAssetsThatCanBeConvertedIntoBnbResponse { #[serde(rename = "details", skip_serializing_if = "Option::is_none")] pub details: Option>, #[serde(rename = "totalTransferBtc", skip_serializing_if = "Option::is_none")] pub total_transfer_btc: Option, #[serde(rename = "totalTransferBNB", skip_serializing_if = "Option::is_none")] pub total_transfer_bnb: Option, #[serde(rename = "dribbletPercentage", skip_serializing_if = "Option::is_none")] pub dribblet_percentage: Option, } impl GetAssetsThatCanBeConvertedIntoBnbResponse { #[must_use] pub fn new() -> GetAssetsThatCanBeConvertedIntoBnbResponse { GetAssetsThatCanBeConvertedIntoBnbResponse { details: None, total_transfer_btc: None, total_transfer_bnb: None, dribblet_percentage: None, } } } src/wallet/rest_api/models/get_assets_that_can_be_converted_into_bnb_response_details_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "assetFullName", skip_serializing_if = "Option::is_none")] pub asset_full_name: Option, #[serde(rename = "amountFree", skip_serializing_if = "Option::is_none")] pub amount_free: Option, #[serde(rename = "toBTC", skip_serializing_if = "Option::is_none")] pub to_btc: Option, #[serde(rename = "toBNB", skip_serializing_if = "Option::is_none")] pub to_bnb: Option, #[serde(rename = "toBNBOffExchange", skip_serializing_if = "Option::is_none")] pub to_bnb_off_exchange: Option, #[serde(rename = "exchange", skip_serializing_if = "Option::is_none")] pub exchange: Option, } impl GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner { #[must_use] pub fn new() -> GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner { GetAssetsThatCanBeConvertedIntoBnbResponseDetailsInner { asset: None, asset_full_name: None, amount_free: None, to_btc: None, to_bnb: None, to_bnb_off_exchange: None, exchange: None, } } } src/wallet/rest_api/models/get_cloud_mining_payment_and_refund_history_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCloudMiningPaymentAndRefundHistoryResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, } impl GetCloudMiningPaymentAndRefundHistoryResponse { #[must_use] pub fn new() -> GetCloudMiningPaymentAndRefundHistoryResponse { GetCloudMiningPaymentAndRefundHistoryResponse { total: None, rows: None, } } } src/wallet/rest_api/models/get_cloud_mining_payment_and_refund_history_response_rows_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetCloudMiningPaymentAndRefundHistoryResponseRowsInner { #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")] pub create_time: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, } impl GetCloudMiningPaymentAndRefundHistoryResponseRowsInner { #[must_use] pub fn new() -> GetCloudMiningPaymentAndRefundHistoryResponseRowsInner { GetCloudMiningPaymentAndRefundHistoryResponseRowsInner { create_time: None, tran_id: None, r#type: None, asset: None, amount: None, status: None, } } } src/wallet/rest_api/models/get_open_symbol_list_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetOpenSymbolListResponseInner { #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")] pub open_time: Option, #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")] pub symbols: Option>, } impl GetOpenSymbolListResponseInner { #[must_use] pub fn new() -> GetOpenSymbolListResponseInner { GetOpenSymbolListResponseInner { open_time: None, symbols: None, } } } src/wallet/rest_api/models/get_spot_delist_schedule_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSpotDelistScheduleResponseInner { #[serde(rename = "delistTime", skip_serializing_if = "Option::is_none")] pub delist_time: Option, #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")] pub symbols: Option>, } impl GetSpotDelistScheduleResponseInner { #[must_use] pub fn new() -> GetSpotDelistScheduleResponseInner { GetSpotDelistScheduleResponseInner { delist_time: None, symbols: None, } } } src/wallet/rest_api/models/get_symbols_delist_schedule_for_spot_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GetSymbolsDelistScheduleForSpotResponseInner { #[serde(rename = "delistTime", skip_serializing_if = "Option::is_none")] pub delist_time: Option, #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")] pub symbols: Option>, } impl GetSymbolsDelistScheduleForSpotResponseInner { #[must_use] pub fn new() -> GetSymbolsDelistScheduleForSpotResponseInner { GetSymbolsDelistScheduleForSpotResponseInner { delist_time: None, symbols: None, } } } src/wallet/rest_api/models/one_click_arrival_deposit_apply_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct OneClickArrivalDepositApplyResponse { #[serde(rename = "code", skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option, #[serde(rename = "data", skip_serializing_if = "Option::is_none")] pub data: Option, #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, } impl OneClickArrivalDepositApplyResponse { #[must_use] pub fn new() -> OneClickArrivalDepositApplyResponse { OneClickArrivalDepositApplyResponse { code: None, message: None, data: None, success: None, } } } src/wallet/rest_api/models/query_user_delegation_history_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUserDelegationHistoryResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, } impl QueryUserDelegationHistoryResponse { #[must_use] pub fn new() -> QueryUserDelegationHistoryResponse { QueryUserDelegationHistoryResponse { total: None, rows: None, } } } src/wallet/rest_api/models/query_user_delegation_history_response_rows_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUserDelegationHistoryResponseRowsInner { #[serde(rename = "clientTranId", skip_serializing_if = "Option::is_none")] pub client_tran_id: Option, #[serde(rename = "transferType", skip_serializing_if = "Option::is_none")] pub transfer_type: Option, #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "time", skip_serializing_if = "Option::is_none")] pub time: Option, } impl QueryUserDelegationHistoryResponseRowsInner { #[must_use] pub fn new() -> QueryUserDelegationHistoryResponseRowsInner { QueryUserDelegationHistoryResponseRowsInner { client_tran_id: None, transfer_type: None, asset: None, amount: None, time: None, } } } src/wallet/rest_api/models/query_user_universal_transfer_history_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUserUniversalTransferHistoryResponse { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, #[serde(rename = "rows", skip_serializing_if = "Option::is_none")] pub rows: Option>, } impl QueryUserUniversalTransferHistoryResponse { #[must_use] pub fn new() -> QueryUserUniversalTransferHistoryResponse { QueryUserUniversalTransferHistoryResponse { total: None, rows: None, } } } src/wallet/rest_api/models/query_user_universal_transfer_history_response_rows_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUserUniversalTransferHistoryResponseRowsInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, } impl QueryUserUniversalTransferHistoryResponseRowsInner { #[must_use] pub fn new() -> QueryUserUniversalTransferHistoryResponseRowsInner { QueryUserUniversalTransferHistoryResponseRowsInner { asset: None, amount: None, r#type: None, status: None, tran_id: None, timestamp: None, } } } src/wallet/rest_api/models/query_user_wallet_balance_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct QueryUserWalletBalanceResponseInner { #[serde(rename = "activate", skip_serializing_if = "Option::is_none")] pub activate: Option, #[serde(rename = "balance", skip_serializing_if = "Option::is_none")] pub balance: Option, #[serde(rename = "walletName", skip_serializing_if = "Option::is_none")] pub wallet_name: Option, } impl QueryUserWalletBalanceResponseInner { #[must_use] pub fn new() -> QueryUserWalletBalanceResponseInner { QueryUserWalletBalanceResponseInner { activate: None, balance: None, wallet_name: None, } } } src/wallet/rest_api/models/submit_deposit_questionnaire_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubmitDepositQuestionnaireResponse { #[serde(rename = "trId", skip_serializing_if = "Option::is_none")] pub tr_id: Option, #[serde(rename = "accepted", skip_serializing_if = "Option::is_none")] pub accepted: Option, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option, } impl SubmitDepositQuestionnaireResponse { #[must_use] pub fn new() -> SubmitDepositQuestionnaireResponse { SubmitDepositQuestionnaireResponse { tr_id: None, accepted: None, info: None, } } } src/wallet/rest_api/models/submit_deposit_questionnaire_travel_rule_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SubmitDepositQuestionnaireTravelRuleResponse { #[serde(rename = "trId", skip_serializing_if = "Option::is_none")] pub tr_id: Option, #[serde(rename = "accepted", skip_serializing_if = "Option::is_none")] pub accepted: Option, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option, } impl SubmitDepositQuestionnaireTravelRuleResponse { #[must_use] pub fn new() -> SubmitDepositQuestionnaireTravelRuleResponse { SubmitDepositQuestionnaireTravelRuleResponse { tr_id: None, accepted: None, info: None, } } } src/wallet/rest_api/models/system_status_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct SystemStatusResponse { #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "msg", skip_serializing_if = "Option::is_none")] pub msg: Option, } impl SystemStatusResponse { #[must_use] pub fn new() -> SystemStatusResponse { SystemStatusResponse { status: None, msg: None, } } } src/wallet/rest_api/models/toggle_bnb_burn_on_spot_trade_and_margin_interest_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ToggleBnbBurnOnSpotTradeAndMarginInterestResponse { #[serde(rename = "spotBNBBurn", skip_serializing_if = "Option::is_none")] pub spot_bnb_burn: Option, #[serde(rename = "interestBNBBurn", skip_serializing_if = "Option::is_none")] pub interest_bnb_burn: Option, } impl ToggleBnbBurnOnSpotTradeAndMarginInterestResponse { #[must_use] pub fn new() -> ToggleBnbBurnOnSpotTradeAndMarginInterestResponse { ToggleBnbBurnOnSpotTradeAndMarginInterestResponse { spot_bnb_burn: None, interest_bnb_burn: None, } } } src/wallet/rest_api/models/trade_fee_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TradeFeeResponseInner { #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")] pub symbol: Option, #[serde(rename = "makerCommission", skip_serializing_if = "Option::is_none")] pub maker_commission: Option, #[serde(rename = "takerCommission", skip_serializing_if = "Option::is_none")] pub taker_commission: Option, } impl TradeFeeResponseInner { #[must_use] pub fn new() -> TradeFeeResponseInner { TradeFeeResponseInner { symbol: None, maker_commission: None, taker_commission: None, } } } src/wallet/rest_api/models/user_asset_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UserAssetResponseInner { #[serde(rename = "asset", skip_serializing_if = "Option::is_none")] pub asset: Option, #[serde(rename = "free", skip_serializing_if = "Option::is_none")] pub free: Option, #[serde(rename = "locked", skip_serializing_if = "Option::is_none")] pub locked: Option, #[serde(rename = "freeze", skip_serializing_if = "Option::is_none")] pub freeze: Option, #[serde(rename = "withdrawing", skip_serializing_if = "Option::is_none")] pub withdrawing: Option, #[serde(rename = "ipoable", skip_serializing_if = "Option::is_none")] pub ipoable: Option, #[serde(rename = "btcValuation", skip_serializing_if = "Option::is_none")] pub btc_valuation: Option, } impl UserAssetResponseInner { #[must_use] pub fn new() -> UserAssetResponseInner { UserAssetResponseInner { asset: None, free: None, locked: None, freeze: None, withdrawing: None, ipoable: None, btc_valuation: None, } } } src/wallet/rest_api/models/user_universal_transfer_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct UserUniversalTransferResponse { #[serde(rename = "tranId", skip_serializing_if = "Option::is_none")] pub tran_id: Option, } impl UserUniversalTransferResponse { #[must_use] pub fn new() -> UserUniversalTransferResponse { UserUniversalTransferResponse { tran_id: None } } } src/wallet/rest_api/models/vasp_list_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct VaspListResponseInner { #[serde(rename = "vaspName", skip_serializing_if = "Option::is_none")] pub vasp_name: Option, #[serde(rename = "vaspCode", skip_serializing_if = "Option::is_none")] pub vasp_code: Option, } impl VaspListResponseInner { #[must_use] pub fn new() -> VaspListResponseInner { VaspListResponseInner { vasp_name: None, vasp_code: None, } } } src/wallet/rest_api/models/withdraw_history_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct WithdrawHistoryResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "transactionFee", skip_serializing_if = "Option::is_none")] pub transaction_fee: Option, #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde(rename = "applyTime", skip_serializing_if = "Option::is_none")] pub apply_time: Option, #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "transferType", skip_serializing_if = "Option::is_none")] pub transfer_type: Option, #[serde(rename = "withdrawOrderId", skip_serializing_if = "Option::is_none")] pub withdraw_order_id: Option, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option, #[serde(rename = "confirmNo", skip_serializing_if = "Option::is_none")] pub confirm_no: Option, #[serde(rename = "walletType", skip_serializing_if = "Option::is_none")] pub wallet_type: Option, #[serde(rename = "txKey", skip_serializing_if = "Option::is_none")] pub tx_key: Option, #[serde(rename = "completeTime", skip_serializing_if = "Option::is_none")] pub complete_time: Option, } impl WithdrawHistoryResponseInner { #[must_use] pub fn new() -> WithdrawHistoryResponseInner { WithdrawHistoryResponseInner { id: None, amount: None, transaction_fee: None, coin: None, status: None, address: None, tx_id: None, apply_time: None, network: None, transfer_type: None, withdraw_order_id: None, info: None, confirm_no: None, wallet_type: None, tx_key: None, complete_time: None, } } } src/wallet/rest_api/models/withdraw_history_v2_response_inner.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct WithdrawHistoryV2ResponseInner { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "trId", skip_serializing_if = "Option::is_none")] pub tr_id: Option, #[serde(rename = "amount", skip_serializing_if = "Option::is_none")] pub amount: Option, #[serde(rename = "transactionFee", skip_serializing_if = "Option::is_none")] pub transaction_fee: Option, #[serde(rename = "coin", skip_serializing_if = "Option::is_none")] pub coin: Option, #[serde(rename = "withdrawalStatus", skip_serializing_if = "Option::is_none")] pub withdrawal_status: Option, #[serde(rename = "travelRuleStatus", skip_serializing_if = "Option::is_none")] pub travel_rule_status: Option, #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, #[serde(rename = "addressTag", skip_serializing_if = "Option::is_none")] pub address_tag: Option, #[serde(rename = "txId", skip_serializing_if = "Option::is_none")] pub tx_id: Option, #[serde(rename = "applyTime", skip_serializing_if = "Option::is_none")] pub apply_time: Option, #[serde(rename = "network", skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(rename = "transferType", skip_serializing_if = "Option::is_none")] pub transfer_type: Option, #[serde(rename = "withdrawOrderId", skip_serializing_if = "Option::is_none")] pub withdraw_order_id: Option, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option, #[serde(rename = "confirmNo", skip_serializing_if = "Option::is_none")] pub confirm_no: Option, #[serde(rename = "walletType", skip_serializing_if = "Option::is_none")] pub wallet_type: Option, #[serde(rename = "txKey", skip_serializing_if = "Option::is_none")] pub tx_key: Option, #[serde(rename = "questionnaire", skip_serializing_if = "Option::is_none")] pub questionnaire: Option, #[serde(rename = "completeTime", skip_serializing_if = "Option::is_none")] pub complete_time: Option, } impl WithdrawHistoryV2ResponseInner { #[must_use] pub fn new() -> WithdrawHistoryV2ResponseInner { WithdrawHistoryV2ResponseInner { id: None, tr_id: None, amount: None, transaction_fee: None, coin: None, withdrawal_status: None, travel_rule_status: None, address: None, address_tag: None, tx_id: None, apply_time: None, network: None, transfer_type: None, withdraw_order_id: None, info: None, confirm_no: None, wallet_type: None, tx_key: None, questionnaire: None, complete_time: None, } } } src/wallet/rest_api/models/withdraw_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct WithdrawResponse { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, } impl WithdrawResponse { #[must_use] pub fn new() -> WithdrawResponse { WithdrawResponse { id: None } } } src/wallet/rest_api/models/withdraw_travel_rule_response.rs /* * Binance Wallet REST API * * OpenAPI Specification for the Binance Wallet REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #![allow(unused_imports)] use crate::wallet::rest_api::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct WithdrawTravelRuleResponse { #[serde(rename = "trId", skip_serializing_if = "Option::is_none")] pub tr_id: Option, #[serde(rename = "accpted", skip_serializing_if = "Option::is_none")] pub accpted: Option, #[serde(rename = "info", skip_serializing_if = "Option::is_none")] pub info: Option, } impl WithdrawTravelRuleResponse { #[must_use] pub fn new() -> WithdrawTravelRuleResponse { WithdrawTravelRuleResponse { tr_id: None, accpted: None, info: None, } } }